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