summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-12-28 17:32:05 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-12-28 17:32:05 +0000
commitfa5101347cd3d0db2a825dd43a1f54d468159dfa (patch)
tree47bc4d563a8bec723071f10005a2ab0220750e4a
parent73f47df01bd8da41b07edcc6891d91f62604c3b4 (diff)
Fix hex mode (-x), based on patch from David Gullasch
-rw-r--r--usr.bin/skey/skey.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/skey/skey.c b/usr.bin/skey/skey.c
index 7832a8ba7c4..0e706a8cbad 100644
--- a/usr.bin/skey/skey.c
+++ b/usr.bin/skey/skey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skey.c,v 1.15 2001/06/20 17:12:30 millert Exp $ */
+/* $OpenBSD: skey.c,v 1.16 2001/12/28 17:32:04 millert Exp $ */
/*
* OpenBSD S/Key (skey.c)
*
@@ -137,11 +137,10 @@ main(argc, 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("%d: %-29s %s\n", i,
- btoe(buf, key), put8(buf, key));
- else
- (void)printf("%d: %-29s\n", i, btoe(buf, key));
+ (void)printf(" %s", put8(buf, key));
+ putchar('\n');
f(key);
}
}