* [PATCH] objstrip: wrong variable tested after open()
@ 2009-07-30 14:38 Roel Kluin
0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-07-30 14:38 UTC (permalink / raw)
To: rth, linux-alpha, Andrew Morton
The incorrect variable is tested. fd is used for another open()
and is already tested.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-30 14:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30 14:38 [PATCH] objstrip: wrong variable tested after open() Roel Kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).