Skip to content

Commit

Permalink
arch/alpha/boot/tools/objstrip.c: wrong variable tested after open()
Browse files Browse the repository at this point in the history
The incorrect variable is tested. fd is used for another open()
and is already tested.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Roel Kluin authored and Linus Torvalds committed Sep 22, 2009
1 parent 4f543fa commit 27258e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/alpha/boot/tools/objstrip.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ main (int argc, char *argv[])
ofd = 1;
if (i < argc) {
ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd == -1) {
if (ofd == -1) {
perror("open");
exit(1);
}
Expand Down

0 comments on commit 27258e4

Please sign in to comment.