Re: [PATCH v3 25/34] Adapt to VIR_STRDUP and VIR_STRNDUP in src/util/*

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

 



On 05/20/2013 01:40 PM, Michal Privoznik wrote:
> On 20.05.2013 13:07, Ján Tomko wrote:
>> On 05/03/2013 04:53 PM, Michal Privoznik wrote:
>>>  32 files changed, 356 insertions(+), 567 deletions(-)
>>
>> These functions returned 0 on success before and will need to be adjusted
>> since VIR_STRDUP returns 1 on a successful copy now.
> 
> I don't think so, as long as all callers check for error correctly:
> 
>     if (func() < 0)
>         goto error;
> 
> Which all callers of these functions do.

I've only found one that doesn't:
src/storage/parthelper.c:
        if (virFileResolveLink(path, &canonical_path) != 0) {

But you still should update the comments stating that they return 0 on success.

Jan

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