diff options
author | fanf <fanf@FreeBSD.org> | 2015-05-14 10:32:05 +0000 |
---|---|---|
committer | fanf <fanf@FreeBSD.org> | 2015-05-14 10:32:05 +0000 |
commit | 426168849a59b56fcb5381c9eeec45bd8ba4b54e (patch) | |
tree | 9cda5d4da09e01622ac46dbf0f32788809afad9a /usr.bin | |
parent | 1e9ac2722edf4b9e7e32d382a2cde336126cdcd9 (diff) | |
download | FreeBSD-src-426168849a59b56fcb5381c9eeec45bd8ba4b54e.zip FreeBSD-src-426168849a59b56fcb5381c9eeec45bd8ba4b54e.tar.gz |
whois: code cleanup
Remove deprecated options.
Use pedantically correct types.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/whois/whois.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index a742f27..3ee2c74 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -119,7 +119,7 @@ main(int argc, char *argv[]) country = host = qnichost = NULL; flags = use_qnichost = 0; - while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:QrR6")) != -1) { + while ((ch = getopt(argc, argv, "aAbc:fgh:iIklmp:Qr")) != -1) { switch (ch) { case 'a': host = ANICHOST; @@ -166,15 +166,6 @@ main(int argc, char *argv[]) case 'r': host = RNICHOST; break; - case 'R': - warnx("-R is deprecated; use '-c ru' instead"); - country = "ru"; - break; - /* Remove in FreeBSD 10 */ - case '6': - errx(EX_USAGE, - "-6 is deprecated; use -[aAflr] instead"); - break; case '?': default: usage(); @@ -300,8 +291,9 @@ whois(const char *query, const char *hostname, int flags) FILE *fp; struct addrinfo *hostres, *res; char *buf, *host, *nhost, *p; - int i, j, s = -1, count; - size_t c, len; + int s = -1; + nfds_t i, j; + size_t c, len, count; struct pollfd *fds; int timeout = 180; @@ -497,7 +489,7 @@ static void usage(void) { fprintf(stderr, - "usage: whois [-aAbfgiIklmQrR6] [-c country-code | -h hostname] " + "usage: whois [-aAbfgiIklmQr] [-c country-code | -h hostname] " "[-p port] name ...\n"); exit(EX_USAGE); } |