]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Don't check CPU model property key
authorJiri Denemark <jdenemar@redhat.com>
Wed, 11 Jan 2017 13:29:58 +0000 (14:29 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 12 Jan 2017 10:58:25 +0000 (11:58 +0100)
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@redhat.com>
src/qemu/qemu_monitor_json.c

index e767437c0f2fe893f83a961bf2d81c1cc847d047..9b9c098dc4b6c4105b45c27623276ae7fab859e9 100644 (file)
@@ -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;