From d30a84b8b5a092bd1a38b3de0d03d87ea658b635 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 18 Aug 2005 17:18:25 +0000 Subject: Oops, previous fix would prevent standard input from being processed at all since it is not stat(2)'ed; spotted by fgs@, better fix by tom@ --- usr.bin/hexdump/display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.bin/hexdump') diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index d35d970f338..19cc5222350 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: display.c,v 1.15 2005/08/16 21:51:41 miod Exp $ */ +/* $OpenBSD: display.c,v 1.16 2005/08/18 17:18:24 miod Exp $ */ /* $NetBSD: display.c,v 1.12 2001/12/07 15:14:29 bjh21 Exp $ */ /* @@ -32,7 +32,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)display.c 5.11 (Berkeley) 3/9/91";*/ -static char rcsid[] = "$OpenBSD: display.c,v 1.15 2005/08/16 21:51:41 miod Exp $"; +static char rcsid[] = "$OpenBSD: display.c,v 1.16 2005/08/18 17:18:24 miod Exp $"; #endif /* not lint */ #include @@ -301,7 +301,7 @@ next(char **argv) if (*_argv) { if (!(freopen(*_argv, "r", stdin))) { warn("%s", *_argv); - exitval = 1; + exitval = done = 1; ++_argv; continue; } @@ -315,7 +315,7 @@ next(char **argv) doskip(statok ? *_argv : "stdin", statok); if (*_argv) ++_argv; - if (!skip && statok) + if (!skip) return(1); } /* NOTREACHED */ -- cgit v1.2.3