summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2003-02-24 17:10:32 +0000
committermike <mike@FreeBSD.org>2003-02-24 17:10:32 +0000
commit16b05986d0e6626f027498791f5e38bdca5bd5a3 (patch)
treeaf439bf34b69dfd3b7beeb26ca403185a52c7f00
parent8d132c042025e4b04d276ad5d57dfbc80ed190a2 (diff)
downloadFreeBSD-src-16b05986d0e6626f027498791f5e38bdca5bd5a3.zip
FreeBSD-src-16b05986d0e6626f027498791f5e38bdca5bd5a3.tar.gz
Fix style bugs in previous commit.
-rw-r--r--usr.bin/whois/whois.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index 94e898b..a67158b 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++) {
OpenPOWER on IntegriCloud