diff options
author | 2000-12-12 22:30:01 +0000 | |
---|---|---|
committer | 2000-12-12 22:30:01 +0000 | |
commit | 745f949311e92e880a8e88a4590cbfcc01b379ef (patch) | |
tree | 61133cece4fe405a4118a564a3507fa2c5123ee1 /usr.bin/ssh/ssh-keyscan.c | |
parent | source port < 1024 is no longer required for rhosts-rsa since it (diff) | |
download | wireguard-openbsd-745f949311e92e880a8e88a4590cbfcc01b379ef.tar.xz wireguard-openbsd-745f949311e92e880a8e88a4590cbfcc01b379ef.zip |
consistently use __progname; from stevesk@pobox.com
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 15 |
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)); |