]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Fix ATTRIBUTE_NONNULL for qemuMonitorAddObject
authorJohn Ferlan <jferlan@redhat.com>
Thu, 12 Jul 2018 19:41:32 +0000 (15:41 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 12 Jul 2018 19:52:05 +0000 (15:52 -0400)
Commit id fac0dacd was trying to make things more robust;
however, the ATTRIBUTE_NONNULL(1) would be for the @mon,
not the intended (2) and the @props argument as described
in the commit message.

Found by Coverity build.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_monitor.h

index e8ed2d044c11cbd7aa98857da386954015a77ead..81474a04f6d352c587e56b0548250300774967c0 100644 (file)
@@ -824,7 +824,7 @@ int qemuMonitorCreateObjectProps(virJSONValuePtr *propsret,
 int qemuMonitorAddObject(qemuMonitorPtr mon,
                          virJSONValuePtr *props,
                          char **alias)
-    ATTRIBUTE_NONNULL(1);
+    ATTRIBUTE_NONNULL(2);
 
 int qemuMonitorDelObject(qemuMonitorPtr mon,
                          const char *objalias);