diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-09-21 20:04:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:43 -0400 |
commit | 27258e448eb301cf89e351df87aa8cb916653bf2 (patch) | |
tree | 02ac13d99be71f0f623d176e6ee5125e9507d965 /arch/alpha | |
parent | 4f543fa41e78bd366123424a3378f2f4918c0f33 (diff) |
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>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/boot/tools/objstrip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c index ef183823029..9d0727d18ae 100644 --- a/arch/alpha/boot/tools/objstrip.c +++ b/arch/alpha/boot/tools/objstrip.c | |||
@@ -93,7 +93,7 @@ main (int argc, char *argv[]) | |||
93 | ofd = 1; | 93 | ofd = 1; |
94 | if (i < argc) { | 94 | if (i < argc) { |
95 | ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666); | 95 | ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666); |
96 | if (fd == -1) { | 96 | if (ofd == -1) { |
97 | perror("open"); | 97 | perror("open"); |
98 | exit(1); | 98 | exit(1); |
99 | } | 99 | } |