summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2010-02-28 13:07:27 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2010-02-28 13:07:27 +0000
commit7c9ed02296b1485e2c4e806f3d30798798586c6b (patch)
tree4453675a72aa87a50b85c8df62e95bf8c6bcaf18
parent9952cdbc599a8df09934186f35f8f10732b2cf1b (diff)
In -x mode, if count was > 1 we would print both the hex and ascii versions
of the response (for count == 1 only the hex version was printed). Make things consistent and match the docs by only printing the hex mode even if count > 1. OK otto@
-rw-r--r--usr.bin/skey/skey.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/skey/skey.c b/usr.bin/skey/skey.c
index b60ca6a371a..0f7a04493f4 100644
--- a/usr.bin/skey/skey.c
+++ b/usr.bin/skey/skey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skey.c,v 1.24 2008/11/12 16:13:46 sobrado Exp $ */
+/* $OpenBSD: skey.c,v 1.25 2010/02/28 13:07:26 millert Exp $ */
/*
* OpenBSD S/Key (skey.c)
*
@@ -136,10 +136,10 @@ main(int argc, char *argv[])
for (i = 0; i <= n - cnt; i++)
f(key);
for (; i <= n; i++) {
- (void)printf("%d: %-29s", i, btoe(buf, key));
if (hexmode)
- (void)printf(" %s", put8(buf, key));
- putchar('\n');
+ (void)printf("%d: %s\n", i, put8(buf, key));
+ else
+ (void)printf("%d: %-29s\b", i, btoe(buf, key));
f(key);
}
}