mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-08-02 14:52:19 +00:00
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:
parent
89ab7f9fa5
commit
5e8816796b
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue