diff options
| author | Mike Barcroft <mike@FreeBSD.org> | 2003-02-24 17:10:32 +0000 |
|---|---|---|
| committer | Mike Barcroft <mike@FreeBSD.org> | 2003-02-24 17:10:32 +0000 |
| commit | 80473671e851a24ef2f902110d41f974d22db722 (patch) | |
| tree | af439bf34b69dfd3b7beeb26ca403185a52c7f00 | |
| parent | ba873f4c18244453935f78519ac2b1898a2cc622 (diff) | |
Notes
| -rw-r--r-- | usr.bin/whois/whois.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 94e898bde749..a67158bdd3c3 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -296,10 +296,9 @@ whois(const char *query, const char *hostname, int flags) } s_asprintf(&nhost, "%.*s", (int)(buf + len - host), host); - } - else if ((host = strnstr(buf, WHOIS_ORG_SERVER_ID, len)) - != NULL) { - host += sizeof(WHOIS_ORG_SERVER_ID) - 1; + } else if ((host = + strnstr(buf, WHOIS_ORG_SERVER_ID, len)) != NULL) { + host += sizeof(WHOIS_ORG_SERVER_ID) - 1; for (p = host; p < buf + len; p++) { if (!ishost(*p)) { *p = '\0'; @@ -307,9 +306,8 @@ whois(const char *query, const char *hostname, int flags) } } s_asprintf(&nhost, "%.*s", - (int)(buf + len - host), host); - } - else if (strcmp(hostname, ANICHOST) == 0) { + (int)(buf + len - host), host); + } else if (strcmp(hostname, ANICHOST) == 0) { for (c = 0; c <= len; c++) buf[c] = tolower((int)buf[c]); for (i = 0; ip_whois[i] != NULL; i++) { |
