
12 Apr
2016
12 Apr
'16
10:29 a.m.
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