mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: monitor: Use virJSONValueObjectKeysNumber in qemuMonitorJSONGetCPUModelExpansion
Replace direct access to virJSONValue members by accessor. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
d4dd836edc
commit
d78a91afee
@ -5443,7 +5443,7 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon,
|
||||
if (VIR_STRDUP(machine_model->name, cpu_name) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (VIR_ALLOC_N(machine_model->props, cpu_props->data.object.npairs) < 0)
|
||||
if (VIR_ALLOC_N(machine_model->props, virJSONValueObjectKeysNumber(cpu_props)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virJSONValueObjectForeachKeyValue(cpu_props,
|
||||
|
Loading…
x
Reference in New Issue
Block a user