[lxc-devel] [PATCH] Prevent compiler warning by initializing ifindex
Serge Hallyn
serge.hallyn at ubuntu.com
Mon Aug 25 20:40:02 UTC 2014
Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> ---
> src/lxc/lxc_user_nic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c
> index 145a35d..b2a583c 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());
> --
> 1.9.1
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list