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-1.0.9~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba3d86dd180bc9879f15bce86b87978cbafa6faa;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 7e4c0388a..bdc6365fa 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3425,7 +3425,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)"); } }