diff options
author | 1996-05-21 21:51:51 +0000 | |
---|---|---|
committer | 1996-05-21 21:51:51 +0000 | |
commit | ffecc4b2f3d4886811d8dc30570163246ef7873e (patch) | |
tree | bb04e1e7d1299f434abdc7f9ec3780bff8b36152 | |
parent | errno.h provides what we need (diff) | |
download | wireguard-openbsd-ffecc4b2f3d4886811d8dc30570163246ef7873e.tar.xz wireguard-openbsd-ffecc4b2f3d4886811d8dc30570163246ef7873e.zip |
use existing protos
-rw-r--r-- | usr.bin/hexdump/display.c | 7 | ||||
-rw-r--r-- | usr.bin/hexdump/hexdump.c | 7 |
2 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index d30197bcef2..aa9568b9e7d 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -33,7 +33,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)display.c 5.11 (Berkeley) 3/9/91";*/ -static char rcsid[] = "$Id: display.c,v 1.1.1.1 1995/10/18 08:45:23 deraadt Exp $"; +static char rcsid[] = "$Id: display.c,v 1.2 1996/05/21 21:51:51 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -279,7 +279,7 @@ extern off_t skip; /* bytes to skip */ next(argv) char **argv; { - extern int errno, exitval; + extern int exitval; static int done; int statok; @@ -316,7 +316,6 @@ doskip(fname, statok) char *fname; int statok; { - extern int errno; struct stat sbuf; if (statok) { @@ -354,8 +353,6 @@ emalloc(size) nomem() { - extern int errno; - (void)fprintf(stderr, "hexdump: %s.\n", strerror(errno)); exit(1); } diff --git a/usr.bin/hexdump/hexdump.c b/usr.bin/hexdump/hexdump.c index ed27940e18e..e2a47ea70da 100644 --- a/usr.bin/hexdump/hexdump.c +++ b/usr.bin/hexdump/hexdump.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)hexdump.c 5.5 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$Id: hexdump.c,v 1.1.1.1 1995/10/18 08:45:23 deraadt Exp $"; +static char rcsid[] = "$Id: hexdump.c,v 1.2 1996/05/21 21:51:51 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -55,11 +55,10 @@ main(argc, argv) int argc; char **argv; { - extern int errno; register FS *tfs; - char *p, *rindex(); + char *p; - if (!(p = rindex(argv[0], 'o')) || strcmp(p, "od")) + if (!(p = strrchr(argv[0], 'o')) || strcmp(p, "od")) newsyntax(argc, &argv); else oldsyntax(argc, &argv); |