Skip to content

Commit

Permalink
uml: cow_user.c warning corrections
Browse files Browse the repository at this point in the history
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: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Vitaliy Ivanov authored and Linus Torvalds committed Jul 26, 2011
1 parent fbee8d9 commit 7a99ae7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/um/drivers/cow_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7a99ae7

Please sign in to comment.