summaryrefslogtreecommitdiff
path: root/usr.bin/hexdump
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-11-12 07:54:39 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-11-12 07:54:39 +0000
commite24c11e64167d44d49808edc8689e6755f7b0429 (patch)
tree441037735d096ece4cfdf9138a305e342cfdb579 /usr.bin/hexdump
parenta9c07cf02e561c96a947c82a398d9e5739121c48 (diff)
Use the default 4 correctly if no type size is given to od -t.
ok deraadt miod
Diffstat (limited to 'usr.bin/hexdump')
-rw-r--r--usr.bin/hexdump/odsyntax.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/hexdump/odsyntax.c b/usr.bin/hexdump/odsyntax.c
index 0424b5aaa33..fef89ae09e8 100644
--- a/usr.bin/hexdump/odsyntax.c
+++ b/usr.bin/hexdump/odsyntax.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: odsyntax.c,v 1.17 2009/10/27 23:59:39 deraadt Exp $ */
+/* $OpenBSD: odsyntax.c,v 1.18 2009/11/12 07:54:38 nicm Exp $ */
/* $NetBSD: odsyntax.c,v 1.15 2001/12/07 15:14:29 bjh21 Exp $ */
/*-
@@ -267,6 +267,8 @@ posixtypes(char *type_string)
type_string++;
} else if (isdigit(*type_string))
nbytes = strtol(type_string, &type_string, 10);
+ else
+ nbytes = 4;
switch (nbytes) {
case 1: