提交 7a99ae7c 编写于 作者: V Vitaliy Ivanov 提交者: 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: NVitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 fbee8d93
...@@ -186,7 +186,11 @@ static int absolutize(char *to, int size, char *from) ...@@ -186,7 +186,11 @@ static int absolutize(char *to, int size, char *from)
strcat(to, "/"); strcat(to, "/");
strcat(to, from); 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; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册