[libvirt] [PATCH] qemu: Fix ATTRIBUTE_NONNULL for qemuMonitorAddObject

John Ferlan posted 1 patch 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180712200645.14628-1-jferlan@redhat.com
Test syntax-check passed
src/qemu/qemu_monitor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] qemu: Fix ATTRIBUTE_NONNULL for qemuMonitorAddObject
Posted by John Ferlan 5 years, 9 months ago
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>
---

 Pushed as trivial and Coverity build breaker.

 src/qemu/qemu_monitor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index e8ed2d044c..81474a04f6 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -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);
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list