diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-07-14 07:16:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-07-14 07:16:13 +0000 |
commit | 572d4f85c5a442d40d32ac4975ed7cb1109eeb6b (patch) | |
tree | 310c2d138a43921222984a72988c6bf132dd5301 | |
parent | b97b08644b37529dd600a8a19dbe8fa68f319a14 (diff) |
previous two patches mixed up if/else matching
-rw-r--r-- | usr.bin/jot/jot.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index ac9c309d5b4..c44ee3ee813 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: jot.c,v 1.4 1999/12/04 21:28:34 deraadt Exp $ */ +/* $OpenBSD: jot.c,v 1.5 2000/07/14 07:16:12 deraadt Exp $ */ /* $NetBSD: jot.c,v 1.3 1994/12/02 20:29:43 pk Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)jot.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: jot.c,v 1.4 1999/12/04 21:28:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: jot.c,v 1.5 2000/07/14 07:16:12 deraadt Exp $"; #endif /* not lint */ /* @@ -137,28 +137,30 @@ getargs(ac, av) case 'b': boring = 1; case 'w': - if ((*av)[2]) + if ((*av)[2]) { if (strlcpy(format, *av + 2, sizeof(format)) >= sizeof(format)) error("-w word too long", ""); - else if (!--ac) + } else if (!--ac) error("Need context word after -w or -b", ""); - else + else { if (strlcpy(format, *++av, sizeof(format)) >= sizeof(format)) error("-w word too long", ""); + } break; case 's': - if ((*av)[2]) + if ((*av)[2]) { if (strlcpy(sepstring, *av + 2, sizeof(sepstring)) >= sizeof(sepstring)) error("-s word too long", ""); - else if (!--ac) + } else if (!--ac) error("Need string after -s", ""); - else + else { if (strlcpy(sepstring, *++av, sizeof(sepstring)) >= sizeof(sepstring)) error("-s word too long", ""); + } break; case 'p': if ((*av)[2]) |