summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-keyscan.c
diff options
context:
space:
mode:
authorstevesk <stevesk@openbsd.org>2002-06-27 19:49:08 +0000
committerstevesk <stevesk@openbsd.org>2002-06-27 19:49:08 +0000
commit10b2c3b02cc2259e5d4f329c408ea4ceb64e49f3 (patch)
tree111370552b15c938f2f0c5708c9ca925116e0a28 /usr.bin/ssh/ssh-keyscan.c
parentDo not muck with the color palette unless the console depth is 8 bit. (diff)
downloadwireguard-openbsd-10b2c3b02cc2259e5d4f329c408ea4ceb64e49f3.tar.xz
wireguard-openbsd-10b2c3b02cc2259e5d4f329c408ea4ceb64e49f3.zip
use convtime(); ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r--usr.bin/ssh/ssh-keyscan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c
index 0d4331a394b..8e1c3b8e116 100644
--- a/usr.bin/ssh/ssh-keyscan.c
+++ b/usr.bin/ssh/ssh-keyscan.c
@@ -7,7 +7,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keyscan.c,v 1.37 2002/06/27 08:49:44 markus Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.38 2002/06/27 19:49:08 stevesk Exp $");
#include <sys/queue.h>
#include <errno.h>
@@ -696,9 +696,11 @@ main(int argc, char **argv)
}
break;
case 'T':
- timeout = atoi(optarg);
- if (timeout <= 0)
+ timeout = convtime(optarg);
+ if (timeout == -1 || timeout == 0) {
+ fprintf(stderr, "Bad timeout '%s'\n", optarg);
usage();
+ }
break;
case 'v':
if (!debug_flag) {