Commit ccc6b728 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

parasite: Initialize fd in parasite_get_proc_fd

Otherwise I get

 | parasite.c: In function ‘parasite_service’:
 | parasite.c:383:11: error: ‘fd’ may be used uninitialized in this function [-Werror=uninitialized]
 | cc1: all warnings being treated as errors
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 30b08baa
...@@ -380,7 +380,7 @@ static int init(struct parasite_init_args *args) ...@@ -380,7 +380,7 @@ static int init(struct parasite_init_args *args)
static char proc_mountpoint[] = "proc.crtools"; static char proc_mountpoint[] = "proc.crtools";
static int parasite_get_proc_fd() static int parasite_get_proc_fd()
{ {
int ret, fd; int ret, fd = -1;
char buf[2]; char buf[2];
ret = sys_readlink("/proc/self", buf, sizeof(buf)); ret = sys_readlink("/proc/self", buf, sizeof(buf));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment