On 9/7/22 8:13 AM, Kristina Hanicova wrote:
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
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;
}
Reviewed-by: Jonathon Jongsma <jjongsma(a)redhat.com>