Prevent compiler warning by initializing ifindex

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Stéphane Graber 2014-08-25 15:47:35 -04:00
parent 361b4fe7e2
commit 9a189b092e

View 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());