On 06/24/2016 03:55 PM, Laine Stump wrote:
>> + VIR_DEBUG("Adding IP address %s/%d%s%s%s%s to
%s", ipStr,
>> prefix,
>> + peerStr ? " peer " : "", peerStr ? peerStr :
"",
>> + bcastStr ? " bcast " : "", bcastStr ? bcastStr
: "",
>> + ifname);
>> +
> NULLSTR() or perhaps EMPTYSTR()? For ipStr, peerStr, and bcastStr...
>
> In any case, since ipStr could be NULL it needs the similar check
Yep. I'll do that.
Actually, neither NULLSTR() nor EMPTYSTR() does what is needed, as the
former inserts "<null>" and the latter inserts "-", while I want
it to
insert "". I will do it for ipStr though, just on the off chance that
virSocketAddrFormat() gets an OOM or some other strange error.
(Practically speaking glibc would put "(null)" into the string in that
case, but just in case someone isn't using glibc...)