[libvirt] [PATCH 20/28] lxc: move debug/error log when adding IP addresses to virNetDevIPAddrAdd

Laine Stump laine at laine.org
Sun Jun 26 21:20:57 UTC 2016


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...)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160626/50a7fdd0/attachment-0001.htm>


More information about the libvir-list mailing list