+ VIR_DEBUG("Adding IP address %s/%d%s%s%s%s to %s", ipStr, prefix,NULLSTR() or perhaps EMPTYSTR()? For ipStr, peerStr, and bcastStr...
+ peerStr ? " peer " : "", peerStr ? peerStr : "",
+ bcastStr ? " bcast " : "", bcastStr ? bcastStr : "",
+ ifname);
+
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...)