From cd917f48454875ad6b7fc69455281d72760c44ee Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 13 May 2023 10:58:41 +0200 Subject: best practices & coding style fixes * I don't really need to declare all variables at the top of the function anymore. * Default-initialize variables more. * Don't set the output parameter until the object is completely constructed. --- src/worker_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/worker_main.c') diff --git a/src/worker_main.c b/src/worker_main.c index fc3d0a2..01f87b6 100644 --- a/src/worker_main.c +++ b/src/worker_main.c @@ -62,7 +62,7 @@ static int parse_settings(struct settings *settings, int argc, char *argv[]) int main(int argc, char *argv[]) { struct settings settings; - struct worker *worker; + struct worker *worker = NULL; int ret = 0; ret = parse_settings(&settings, argc, argv); -- cgit v1.2.3