]> 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>
Mon, 25 Aug 2014 20:59:02 +0000 (16:59 -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 b2b5434c13295291302f93a7a9eed61e5d01ee4d..02f2a2cbb1e92e3489a5e1ec6e893bde41427a6a 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());