[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH libguestfs 17/23] generator.ml: move String/Device decls "down" to definition



From: Jim Meyering <meyering redhat com>

---
 src/generator.ml |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/generator.ml b/src/generator.ml
index f9032fb..8aa36bd 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -4691,9 +4691,9 @@ and generate_daemon_actions () =
            pr "  struct guestfs_%s_args args;\n" name;
            List.iter (
              function
-             | Device n -> pr "  const char *%s;\n" n
+             | Device n
              | Pathname n
-             | String n
+             | String n -> ()
              | OptString n -> pr "  char *%s;\n" n
              | StringList n -> pr "  char **%s;\n" n
              | Bool n -> pr "  int %s;\n" n
@@ -4715,12 +4715,12 @@ and generate_daemon_actions () =
            List.iter (
              function
              | Pathname n ->
-                 pr "  %s = args.%s;\n" n n;
+                 pr "  char *%s = args.%s;\n" n n;
                  pr "  ABS_PATH (%s, goto done);\n" n;
 	     | Device n ->
-                 pr "  %s = args.%s;\n" n n;
+                 pr "  char *%s = args.%s;\n" n n;
                  pr "  RESOLVE_DEVICE (%s, goto done);" n;
-             | String n -> pr "  %s = args.%s;\n" n n
+             | String n -> pr "  char *%s = args.%s;\n" n n
              | OptString n -> pr "  %s = args.%s ? *args.%s : NULL;\n" n n n
              | StringList n ->
                  pr "  %s = realloc (args.%s.%s_val,\n" n n n;
-- 
1.6.4.337.g5420e


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]