提交 27258e44 编写于 作者: R Roel Kluin 提交者: Linus Torvalds

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: NRoel Kluin <roel.kluin@gmail.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4f543fa4
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册