render / rpms / libvirt

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