]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Prevent compiler warning by initializing ifindex
authorStéphane Graber <stgraber@ubuntu.com>
Mon, 25 Aug 2014 19:47:35 +0000 (15:47 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Sat, 20 Sep 2014 01:12:21 +0000 (21:12 -0400)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_user_nic.c

index 5a1f6dbd999059a6e919fb4a2095ad6f0d2b7fce..64e9d1a47c692985e0c20cbb271ce1a4a20b6813 100644 (file)
@@ -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());