summaryrefslogtreecommitdiff
path: root/ssh-keyscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r--ssh-keyscan.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index d81077764..9a91be499 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keyscan.c,v 1.76 2008/04/30 10:14:03 djm Exp $ */ 1/* $OpenBSD: ssh-keyscan.c,v 1.78 2009/01/22 10:02:34 djm Exp $ */
2/* 2/*
3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4 * 4 *
@@ -713,8 +713,9 @@ fatal(const char *fmt,...)
713static void 713static void
714usage(void) 714usage(void)
715{ 715{
716 fprintf(stderr, "usage: %s [-46Hv] [-f file] [-p port] [-T timeout] [-t type]\n" 716 fprintf(stderr,
717 "\t\t [host | addrlist namelist] [...]\n", 717 "usage: %s [-46Hv] [-f file] [-p port] [-T timeout] [-t type]\n"
718 "\t\t [host | addrlist namelist] ...\n",
718 __progname); 719 __progname);
719 exit(1); 720 exit(1);
720} 721}
@@ -747,7 +748,7 @@ main(int argc, char **argv)
747 break; 748 break;
748 case 'p': 749 case 'p':
749 ssh_port = a2port(optarg); 750 ssh_port = a2port(optarg);
750 if (ssh_port == 0) { 751 if (ssh_port <= 0) {
751 fprintf(stderr, "Bad port '%s'\n", optarg); 752 fprintf(stderr, "Bad port '%s'\n", optarg);
752 exit(1); 753 exit(1);
753 } 754 }