summaryrefslogtreecommitdiff
path: root/usr.bin/jot
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2017-12-15 13:04:12 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2017-12-15 13:04:12 +0000
commit50f149c206d4b7fd934d504dddbe020068e5856c (patch)
treed3c6965e86df5bc2c5209fc3e20465f7d487bf97 /usr.bin/jot
parent78d13715b990fb7d5f02729099edcd54b3fb43df (diff)
Instead of pointlessly falling through other cases and ending up doing
goto fmt_broken, do it explicitly. Makes following the code path through the switch a bit easier. Prompted by a request by martijn
Diffstat (limited to 'usr.bin/jot')
-rw-r--r--usr.bin/jot/jot.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c
index 63c77bbb6fb..c01ebb0fb3a 100644
--- a/usr.bin/jot/jot.c
+++ b/usr.bin/jot/jot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: jot.c,v 1.37 2017/12/15 12:17:49 tb Exp $ */
+/* $OpenBSD: jot.c,v 1.38 2017/12/15 13:04:11 tb Exp $ */
/* $NetBSD: jot.c,v 1.3 1994/12/02 20:29:43 pk Exp $ */
/*-
@@ -426,6 +426,7 @@ getformat(void)
intdata = true;
break;
}
+ goto fmt_broken;
case 'O': case 'U':
/* %lO and %lU are undefined */
if (!longdata) {
@@ -433,11 +434,13 @@ getformat(void)
intdata = nosign = true;
break;
}
+ goto fmt_broken;
case 'c':
if (!(intdata | longdata)) {
chardata = true;
break;
}
+ /* FALLTHROUGH */
case 'h': case 'n': case 'p': case 'q': case 's': case 'L':
case '$': case '*':
goto fmt_broken;