mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
Make error codes returned being a negative value
We have a mess in our return codes: some functions return negative values, while others -- positive. Sanitize the return codes and make error condition to return negative values. Reported-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
@@ -318,12 +318,15 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (!log_inited && init_logging(NULL))
|
||||
return 1;
|
||||
if (!log_inited) {
|
||||
ret = init_logging(NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (getcwd(image_dir, sizeof(image_dir)) < 0) {
|
||||
pr_perror("can't get currect directory\n");
|
||||
return 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
|
Reference in New Issue
Block a user