From: Stéphane Graber Date: Mon, 25 Aug 2014 19:47:35 +0000 (-0400) Subject: Prevent compiler warning by initializing ifindex X-Git-Tag: lxc-1.1.0.alpha2~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a189b092e2456f852aa86c8aafda6077416760b;p=thirdparty%2Flxc.git Prevent compiler warning by initializing ifindex Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c index b2b5434c1..02f2a2cbb 100644 --- a/src/lxc/lxc_user_nic.c +++ b/src/lxc/lxc_user_nic.c @@ -475,7 +475,7 @@ again: static int rename_in_ns(int pid, char *oldname, char **newnamep) { char nspath[MAXPATHLEN]; - int fd = -1, ofd = -1, ret, ifindex; + int fd = -1, ofd = -1, ret, ifindex = -1; bool grab_newname = false; ret = snprintf(nspath, MAXPATHLEN, "/proc/%d/ns/net", getpid());