From c387b69cba8f145438188b2b4567abbc9580ade0 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 17 Sep 2012 13:31:45 +0100 Subject: daemon: stubs: Move all arg decls to top of function. For some reason, argument declarations were handled inconsistently for strings and non-string arguments. Non-string arguments were all declared at the top of the function stub, where as string arguments were declared in place. Be consistent. This is just code motion. --- generator/daemon.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/daemon.ml b/generator/daemon.ml index 06ee8120..a807be2a 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -107,7 +107,7 @@ and generate_daemon_actions () = | Device n | Dev_or_Path n | Pathname n | String n - | Key n -> () + | Key n | OptString n -> pr " char *%s;\n" n | StringList n | DeviceList n -> pr " char **%s;\n" n | Bool n -> pr " int %s;\n" n @@ -178,7 +178,7 @@ and generate_daemon_actions () = pr " goto done;\n"; pr " }\n"; let pr_args n = - pr " char *%s = args.%s;\n" n n + pr " %s = args.%s;\n" n n in let pr_list_handling_code n = pr " %s = realloc (args.%s.%s_val,\n" n n n; -- cgit