Re: [PATCHv1.5 18/27] conf: Add functions to copy and free network disk source definitions

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

 



On 11/27/2013 04:15 AM, Michal Privoznik wrote:
> On 26.11.2013 17:49, Peter Krempa wrote:
>> To simplify operations on virDomainDiskHostDef arrays we will need deep
>> copy and freeing functions. Add and properly export them.
>> ---

>> +        if (VIR_STRDUP(dst->port, src->port) < 0)
>> +            goto error;
>> +
>> +        if (VIR_STRDUP(dst->socket, src->socket) < 0)
>> +            goto error;
> 
> Could have been joined into one 'if' with or-ed VIR_STRDUP(). But this
> is just fine too.

Dan has been (successfully) convincing me that separate 'if' is better
for -O2 debugging, because then gdb is better able to show you which
line of code failed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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