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