[PATCH 1/2] qemu: Don't check CPU model property key

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

 



The qemuMonitorJSONParseCPUModelProperty function is a callback for
virJSONValueObjectForeachKeyValue and is called for each key/value pair,
thus it doesn't really make sense to check whether key is NULL.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_monitor_json.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e767437c0..9b9c098dc 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -4982,12 +4982,6 @@ qemuMonitorJSONParseCPUModelProperty(const char *key,
     size_t n = machine_model->nprops;
     bool supported;
 
-    if (!key) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("query-cpu-model-expansion reply data is missing a"
-                         " property name"));
-        return -1;
-    }
     if (VIR_STRDUP(machine_model->props[n].name, key) < 0)
         return -1;
 
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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