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 <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Richard Henderson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
RoelKluin authored and 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.