9c6c51
From ea272bb13a0ef6ab04c78ca671f009506211523b Mon Sep 17 00:00:00 2001
9c6c51
Message-Id: <ea272bb13a0ef6ab04c78ca671f009506211523b@dist-git>
9c6c51
From: John Ferlan <jferlan@redhat.com>
9c6c51
Date: Fri, 13 Jul 2018 10:02:34 +0200
9c6c51
Subject: [PATCH] qemu: Fix ATTRIBUTE_NONNULL for qemuMonitorAddObject
9c6c51
9c6c51
Commit id fac0dacd was trying to make things more robust;
9c6c51
however, the ATTRIBUTE_NONNULL(1) would be for the @mon,
9c6c51
not the intended (2) and the @props argument as described
9c6c51
in the commit message.
9c6c51
9c6c51
Found by Coverity build.
9c6c51
9c6c51
Signed-off-by: John Ferlan <jferlan@redhat.com>
9c6c51
(cherry picked from commit 7406ab691ffe0fbe051f6ae57614737e193df6a5)
9c6c51
9c6c51
The broken commit described in the original commit message was
9c6c51
backported as 1d60f6832c8b14c9a
9c6c51
9c6c51
https: //bugzilla.redhat.com/show_bug.cgi?id=1598015
9c6c51
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
9c6c51
---
9c6c51
 src/qemu/qemu_monitor.h | 2 +-
9c6c51
 1 file changed, 1 insertion(+), 1 deletion(-)
9c6c51
9c6c51
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
9c6c51
index e8ed2d044c..81474a04f6 100644
9c6c51
--- a/src/qemu/qemu_monitor.h
9c6c51
+++ b/src/qemu/qemu_monitor.h
9c6c51
@@ -824,7 +824,7 @@ int qemuMonitorCreateObjectProps(virJSONValuePtr *propsret,
9c6c51
 int qemuMonitorAddObject(qemuMonitorPtr mon,
9c6c51
                          virJSONValuePtr *props,
9c6c51
                          char **alias)
9c6c51
-    ATTRIBUTE_NONNULL(1);
9c6c51
+    ATTRIBUTE_NONNULL(2);
9c6c51
 
9c6c51
 int qemuMonitorDelObject(qemuMonitorPtr mon,
9c6c51
                          const char *objalias);
9c6c51
-- 
9c6c51
2.18.0
9c6c51