summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-keyscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r--usr.bin/ssh/ssh-keyscan.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c
index a6687786b81..9b3baa938f9 100644
--- a/usr.bin/ssh/ssh-keyscan.c
+++ b/usr.bin/ssh/ssh-keyscan.c
@@ -8,7 +8,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keyscan.c,v 1.2 2000/12/06 19:57:48 markus Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.3 2000/12/12 22:30:01 markus Exp $");
#include <sys/queue.h>
#include <errno.h>
@@ -36,7 +36,7 @@ int timeout = 5;
int maxfd;
#define maxcon (maxfd - 10)
-char *prog;
+extern char *__progname;
fd_set read_wait;
int ncon;
@@ -540,7 +540,7 @@ nexthost(int argc, char **argv)
static void
usage(void)
{
- fatal("usage: %s [-t timeout] { [--] host | -f file } ...\n", prog);
+ fatal("usage: %s [-t timeout] { [--] host | -f file } ...\n", __progname);
return;
}
@@ -551,11 +551,6 @@ main(int argc, char **argv)
TAILQ_INIT(&tq);
- if ((prog = strrchr(argv[0], '/')))
- prog++;
- else
- prog = argv[0];
-
if (argc <= argno)
usage();
@@ -576,11 +571,11 @@ main(int argc, char **argv)
maxfd = fdlim_get(1);
if (maxfd < 0)
- fatal("%s: fdlim_get: bad value\n", prog);
+ fatal("%s: fdlim_get: bad value\n", __progname);
if (maxfd > MAXMAXFD)
maxfd = MAXMAXFD;
if (maxcon <= 0)
- fatal("%s: not enough file descriptors\n", prog);
+ fatal("%s: not enough file descriptors\n", __progname);
if (maxfd > fdlim_get(0))
fdlim_set(maxfd);
fdcon = xmalloc(maxfd * sizeof(con));