[PATCH] qemu_monitor_json: remove unnecessary variable 'rc'

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

 



Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
 src/qemu/qemu_monitor_json.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 70fba50e6c..5f7c1a8db9 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -8611,11 +8611,8 @@ qemuMonitorJSONQueryStats(qemuMonitor *mon,
             qemuMonitorQueryStatsProvider *provider = providers->pdata[i];
             const char *type_str = qemuMonitorQueryStatsProviderTypeToString(provider->type);
             virBitmap *names = provider->names;
-            int rc;
 
-            rc = virJSONValueObjectAppendString(provider_obj, "provider", type_str);
-
-            if (rc < 0)
+            if (virJSONValueObjectAppendString(provider_obj, "provider", type_str) < 0)
                 return NULL;
 
             if (!virBitmapIsAllClear(names)) {
@@ -8629,9 +8626,7 @@ qemuMonitorJSONQueryStats(qemuMonitor *mon,
                         return NULL;
                 }
 
-                rc = virJSONValueObjectAppend(provider_obj, "names", &provider_names);
-
-                if (rc < 0)
+                if (virJSONValueObjectAppend(provider_obj, "names", &provider_names) < 0)
                     return NULL;
             }
 
-- 
2.37.2




[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