[PATCH 06/27] qemu: monitor: Make 'id' in 'struct _qemuMonitorFdsetInfo' unsigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_monitor.h      | 2 +-
 src/qemu/qemu_monitor_json.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
index 27e288c724..4c22394972 100644
--- a/src/qemu/qemu_monitor.h
+++ b/src/qemu/qemu_monitor.h
@@ -983,7 +983,7 @@ struct _qemuMonitorFdsetFdInfo {
 };
 typedef struct _qemuMonitorFdsetInfo qemuMonitorFdsetInfo;
 struct _qemuMonitorFdsetInfo {
-    int id;
+    unsigned int id;
     qemuMonitorFdsetFdInfo *fds;
     int nfds;
 };
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index acecdc3943..e5425daf05 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -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;
-- 
2.34.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux