diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-08-18 17:18:25 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-08-18 17:18:25 +0000 |
commit | d30a84b8b5a092bd1a38b3de0d03d87ea658b635 (patch) | |
tree | 3ae57fa989255c80f4be55772b930031617c7058 /usr.bin/hexdump | |
parent | eae406f2b6a9acc479fd2e67e181809de31225ca (diff) |
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@
Diffstat (limited to 'usr.bin/hexdump')
-rw-r--r-- | usr.bin/hexdump/display.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <sys/param.h> @@ -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 */ |