Commit 5e881679 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

parasite: Make init() to return negative error code

Fix a few places where positive value returned as an error sign.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 89ab7f9f
......@@ -342,12 +342,12 @@ static int init(struct parasite_init_args *args)
int ret;
ret = brk_init();
if (ret)
return -ret;
if (ret < 0)
return ret;
tsock = sys_socket(PF_UNIX, SOCK_DGRAM, 0);
if (tsock < 0)
return -tsock;
return tsock;
ret = sys_bind(tsock, (struct sockaddr *) &args->p_addr, args->p_addr_len);
if (ret < 0)
......
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