]> xenbits.xensource.com Git - libvirt.git/commitdiff
rpc: Use struct zero initializer for args
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Jan 2023 15:48:50 +0000 (16:48 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 27 Jan 2023 07:07:13 +0000 (08:07 +0100)
In a recent commit of v9.0.0-104-g0211e430a8 I've turned all args
vars in src/remote/remote_driver.c to be initialized wit {0}.
What I've missed was the generated code.

Do what we've done in v9.0.0-13-g1c656836e3 and init also args,
not just ret.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/rpc/gendispatch.pl

index e9dc8e27d7d7aac2b167c70059a79eb6388ca776..085e2a29d8e03c13ef97ad5618cb92fa14b54aac 100755 (executable)
@@ -1330,7 +1330,7 @@ elsif ($mode eq "client") {
         if ($argtype eq "void") {
             $call_args = "NULL";
         } else {
-            push(@vars_list, "$argtype args");
+            push(@vars_list, "$argtype args = {0}");
 
             my $is_first_arg = 1;
             my $has_node_device = 0;