On 12/03/13 00:01, Eric Blake wrote:
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.
Yep, I've read the conversation and kept this separate exactly for that
reason :)
Peter