[PATCH] qemu_monitor_json: Use proper initializer in qemuMonitorJSONGetBlockInfo()

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

 



From: Michal Privoznik <mprivozn@xxxxxxxxxx>

Inside of qemuMonitorJSONGetBlockInfo() there's a for loop in
which a variable of struct qemuDomainDiskInfo type is declared
and initialized as { false }. This works only because stdbool.h
declares 'false' as a macro, so preprocessor expands initializer
to proper form of { 0 }.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/qemu/qemu_monitor_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index a6fb2a2013..2de68d6518 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -2206,7 +2206,7 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon,
     for (i = 0; i < virJSONValueArraySize(devices); i++) {
         virJSONValue *dev;
         virJSONValue *image;
-        struct qemuDomainDiskInfo info = { false };
+        struct qemuDomainDiskInfo info = { 0 };
         const char *thisdev;
         const char *status;
         const char *qdev;
-- 
2.49.0




[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