From: Serge Hallyn Date: Thu, 14 Jan 2016 23:07:31 +0000 (-0800) Subject: avoid printing null string in error message X-Git-Tag: lxc-2.0.0.beta2~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=685062d6ff3eccf1b43abecbab95c213c22428e0;p=thirdparty%2Flxc.git avoid printing null string in error message Show the ifindex in case it's useful Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index fc315138a..632dde310 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2936,7 +2936,9 @@ void lxc_delete_network(struct lxc_handler *handler) */ if (netdev->ifindex != 0 && lxc_netdev_delete_by_index(netdev->ifindex)) - WARN("failed to remove interface '%s'", netdev->name); + WARN("failed to remove interface %d '%s'", + netdev->ifindex, + netdev->name ? netdev->name : "(null)"); } }