Re: [PATCH 06/10] conf: virDomainDiskDefIotuneParse: simplfiy parsing

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

 



On 04/12/2016 09:55 AM, Peter Krempa wrote:
> Since the structure was pre-initialized to 0 we don't need to set every
> single member to 0 if it's not present in the XML. Additionally if we
> put the name of the field into the error message the code can be
> simplified using a macro to parse the members.
> ---
>  src/conf/domain_conf.c | 81 +++++++++-----------------------------------------
>  1 file changed, 14 insertions(+), 67 deletions(-)
> 

Technically virXPathULongLong can thrown an error with -1 if one of the passed
values is NULL, but old code wasn't handling that, and virxml.c should
probably either drop those conditionals or use a separate error code for it.

ACK

- Cole

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