On 08/05/2010 07:49 PM, Laine Stump wrote:
>>> +        if (virStrToLong_i(line,&next_line, 10,&ids[got]) == -1) {
>>> +            VIR_ERROR(_("Cannot parse number from '%s'"), line);
>>> +            got = -1;
>>> +            goto err;
>>>     err:
>>>       VIR_FREE(cmd);
>>>       VIR_FREE(ret);
>>> -    return -1;
>>> +    return got;
>>>   }
>> Before, this always returned -1 on failure.  But now, if you parse one
>> line before failing to parse the second, it returns 1.  I think the err:
>> label should continue to return -1 on failure.
> 
> 
> But right before the goto err; there is a "got = -1;" Am I missing
> something?

Nope - I was missing the got = -1.  Thanks; no change needed.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to