Skip to content

Commit 27258e4

Browse files
RoelKluintorvalds
authored andcommitted
arch/alpha/boot/tools/objstrip.c: wrong variable tested after open()
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>
1 parent 4f543fa commit 27258e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/alpha/boot/tools/objstrip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ main (int argc, char *argv[])
9393
ofd = 1;
9494
if (i < argc) {
9595
ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666);
96-
if (fd == -1) {
96+
if (ofd == -1) {
9797
perror("open");
9898
exit(1);
9999
}

0 commit comments

Comments
 (0)