diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-09-21 17:04:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 07:17:43 -0700 |
commit | 27258e448eb301cf89e351df87aa8cb916653bf2 (patch) | |
tree | 02ac13d99be71f0f623d176e6ee5125e9507d965 | |
parent | 4f543fa41e78bd366123424a3378f2f4918c0f33 (diff) | |
download | op-kernel-dev-27258e448eb301cf89e351df87aa8cb916653bf2.zip op-kernel-dev-27258e448eb301cf89e351df87aa8cb916653bf2.tar.gz |
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>
-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 ef18382..9d0727d 100644 --- a/arch/alpha/boot/tools/objstrip.c +++ b/arch/alpha/boot/tools/objstrip.c @@ -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); } |