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

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

 



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

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