]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: monitor: Make 'id' in 'struct _qemuMonitorFdsetInfo' unsigned
authorPeter Krempa <pkrempa@redhat.com>
Mon, 24 Jan 2022 15:30:13 +0000 (16:30 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 14 Feb 2022 12:13:59 +0000 (13:13 +0100)
Similarly to the 'qemuMonitorRemoveFdset', it doesn't make sense
to store it as signed when only unsigned values are expected.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c

index 27e288c724b55fcd42eb92619e85d4c4565fba56..4c22394972b2b3e56534f3aa198b58e61508458a 100644 (file)
@@ -983,7 +983,7 @@ struct _qemuMonitorFdsetFdInfo {
 };
 typedef struct _qemuMonitorFdsetInfo qemuMonitorFdsetInfo;
 struct _qemuMonitorFdsetInfo {
-    int id;
+    unsigned int id;
     qemuMonitorFdsetFdInfo *fds;
     int nfds;
 };
index acecdc3943aae9844b3305f005aaea4457c2f6f0..e5425daf053db789b199e519426f1bbef5599828 100644 (file)
@@ -3704,7 +3704,7 @@ qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg,
             return -1;
         }
 
-        if (virJSONValueObjectGetNumberInt(entry, "fdset-id", &fdsetinfo->id) < 0) {
+        if (virJSONValueObjectGetNumberUint(entry, "fdset-id", &fdsetinfo->id) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("query-fdsets reply was missing 'fdset-id'"));
             return -1;