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