summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2016-08-05 13:43:39 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2016-08-05 13:43:39 +0000
commitf7151b1364e711e54438bf05d0640ea7f57e3cc0 (patch)
tree3891fb8be724f23c916438931792fb28a8cb4e3d /usr.bin
parenta7a0ded8c160c2c84aed10d635da7ac1cca4e337 (diff)
If reps and steps were omitted, while begin and end were specified,
use a default step size of +1 or -1. Fixes the last two failing regression tests dhhd and dhhd2. Adapted from FreeBSD. 'good direction' deraadt
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/jot/jot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c
index 19bd6600412..f03ccb1dbbf 100644
--- a/usr.bin/jot/jot.c
+++ b/usr.bin/jot/jot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: jot.c,v 1.30 2016/08/05 13:33:21 tb Exp $ */
+/* $OpenBSD: jot.c,v 1.31 2016/08/05 13:43:38 tb Exp $ */
/* $NetBSD: jot.c,v 1.3 1994/12/02 20:29:43 pk Exp $ */
/*-
@@ -195,9 +195,9 @@ main(int argc, char *argv[])
mask = 015;
break;
case 006:
- reps = REPS_DEF;
- mask = 016;
- break;
+ s = ender > begin ? 1 : -1;
+ mask = 007;
+ /* FALLTHROUGH */
case 007:
if (randomize) {
reps = REPS_DEF;