Re: [PATCH 3/3] qemu: simplify json parsing

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

 



On 22.06.2015 15:52, Eric Blake wrote:
> On 06/20/2015 01:42 PM, Eric Blake wrote:
>> Rather than grabbing an arbitrary JSON value and then checking
>> if it has the right type, we might as well request the correct
>> type to begin with.
> 
>>
>> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
>> ---
>>  src/qemu/qemu_monitor_json.c | 164 ++++++++++++++++---------------------------
>>  1 file changed, 61 insertions(+), 103 deletions(-)
>>
> 
>> @@ -271,7 +269,7 @@ qemuMonitorJSONCommandWithFd(qemuMonitorPtr mon,
>>
>>      memset(&msg, 0, sizeof(msg));
>>
>> -    exe = virJSONValueObjectGet(cmd, "execute");
>> +    exe = virJSONValueObjectGetObject(cmd, "execute");
>>      if (exe) {
>>          if (!(id = qemuMonitorNextCommandID(mon)))
>>              goto cleanup;
> 
> This hunk is spurious (the 'execute' member is a string, not an object);
> I've removed it locally from my tree.
> 
> 

Agreed. ACK to all the patches then.

Michal

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