Commit 85b991c2 authored by Andrey Vagin's avatar Andrey Vagin Committed by Cyrill Gorcunov

pipe: Don't redefine the variable ret

For this reason a function may return success in case of error.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 92a694cf
...@@ -1194,7 +1194,7 @@ err: ...@@ -1194,7 +1194,7 @@ err:
static int prepare_pipes(int pid) static int prepare_pipes(int pid)
{ {
u32 type = 0, ret = 1; u32 type = 0, err = 1, ret;
int pipes_fd; int pipes_fd;
struct pipe_list_entry *le, *buf; struct pipe_list_entry *le, *buf;
...@@ -1225,7 +1225,6 @@ static int prepare_pipes(int pid) ...@@ -1225,7 +1225,6 @@ static int prepare_pipes(int pid)
} }
while (1) { while (1) {
int ret;
struct list_head *cur; struct list_head *cur;
struct pipe_list_entry *cur_entry; struct pipe_list_entry *cur_entry;
...@@ -1264,11 +1263,11 @@ static int prepare_pipes(int pid) ...@@ -1264,11 +1263,11 @@ static int prepare_pipes(int pid)
goto err_free; goto err_free;
} }
ret = 0; err = 0;
err_free: err_free:
free(buf); free(buf);
close(pipes_fd); close(pipes_fd);
return ret; return err;
} }
static int restore_one_task(int pid) static int restore_one_task(int pid)
......
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