]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
avoid printing null string in error message
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 14 Jan 2016 23:07:31 +0000 (15:07 -0800)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 17 Nov 2016 22:43:18 +0000 (17:43 -0500)
Show the ifindex in case it's useful

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/conf.c

index 7e4c0388ad9e4e6f1b527d600d65075abd78e791..bdc6365faf5876aaf5e34eedf6f36eeac710e2b7 100644 (file)
@@ -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)");
        }
 }