Commit 7a99ae7c authored by Vitaliy Ivanov's avatar Vitaliy Ivanov Committed by Linus Torvalds

uml: cow_user.c warning corrections

Fix this warning:

  arch/um/drivers/cow_user.c: In function `absolutize':
  arch/um/drivers/cow_user.c:189:7: warning: ignoring return value of `chdir', declared with attribute warn_unused_result

[richard@nod.at: happens only with -D_FORTIFY_SOURCE=2]
Signed-off-by: default avatarVitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fbee8d93
......@@ -186,7 +186,11 @@ static int absolutize(char *to, int size, char *from)
strcat(to, "/");
strcat(to, from);
}
chdir(save_cwd);
if (chdir(save_cwd)) {
cow_printf("absolutize : Can't cd to '%s' - "
"errno = %d\n", save_cwd, errno);
return -1;
}
return 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