parasite: Make init() to return negative error code

Fix a few places where positive value returned as an error sign.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2012-11-06 18:18:23 +04:00 committed by Pavel Emelyanov
parent 89ab7f9fa5
commit 5e8816796b

View file

@ -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)