Commit 739ca109 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

crtools: Fix getcwd return value test

getcwd returns NULL on error, fix it.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent c1350f9a
......@@ -324,7 +324,7 @@ int main(int argc, char *argv[])
return ret;
}
if (getcwd(image_dir, sizeof(image_dir)) < 0) {
if (!getcwd(image_dir, sizeof(image_dir))) {
pr_perror("can't get currect directory\n");
return -1;
}
......
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