[Pkg-libvirt-commits] [libguestfs] 90/165: generator: fix daemon functions with optional params but no mandatory params

Hilko Bengen bengen at moszumanska.debian.org
Sat Aug 30 08:24:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 4d8ecb0d30b8e0c49ddb750b5102a2cb67fdd2b5
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Thu May 29 10:32:15 2014 +0200

    generator: fix daemon functions with optional params but no mandatory params
    
    The
      struct guestfs_$function_args args;
    declaration was not emitted in that case, leading to build failure.
---
 generator/c.ml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/generator/c.ml b/generator/c.ml
index ee276dc..1fa05ab 100644
--- a/generator/c.ml
+++ b/generator/c.ml
@@ -1658,9 +1658,9 @@ and generate_client_actions hash () =
     let args_passed_to_daemon =
       List.filter (function FileIn _ | FileOut _ -> false | _ -> true)
         args in
-    (match args_passed_to_daemon with
-    | [] -> ()
-    | _ -> pr "  struct guestfs_%s_args args;\n" name
+    (match args_passed_to_daemon, optargs with
+    | [], [] -> ()
+    | _, _ -> pr "  struct guestfs_%s_args args;\n" name
     );
 
     pr "  guestfs_message_header hdr;\n";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list