Re: [PATCH 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

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

 



On Mon, Apr 16, 2018 at 01:06:56AM -0500, Chris Venteicher wrote:
> New function qemuMonitorJSONBuildCPUModelInfo created by extracting code
> from existing function qemuMonitorJSONGetCPUModelExpansion to create a
> reusable function for extracting cpu model info from json.
> ---
>  src/qemu/qemu_monitor_json.c | 82 ++++++++++++++++++++++++++++++--------------
>  1 file changed, 56 insertions(+), 26 deletions(-)
>
...

> +    if (virJSONValueObjectForeachKeyValue(cpu_props,
> +                                          qemuMonitorJSONParseCPUModelProperty,
> +                                          machine_model) < 0)
> +        goto cleanup;
> +
> +    ret = 0;
> +    *model = machine_model;
> +    machine_model = NULL;

we also tend to use VIR_STEAL_PTR(dst, src) in ^this case.

Erik

--
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