diff options
author | Marco d'Itri <md@linux.it> | 2014-10-15 15:03:13 +0200 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2014-10-15 15:19:12 +0200 |
commit | 45bdfcc27c550902b21e6bbbdd20b80eb211d378 (patch) | |
tree | 04c490c6d760eb00f3dee5bf8df90a9ba7d78419 /whois.c | |
parent | 3ad4f437351340cf1c1faada80d01f886202ca58 (diff) | |
download | whois-45bdfcc27c550902b21e6bbbdd20b80eb211d378.tar.gz |
Convert convert_inaddr() to in_domain()
Diffstat (limited to 'whois.c')
-rw-r--r-- | whois.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1261,17 +1261,17 @@ char *convert_inaddr(const char *s) if (errno || a < 0 || a > 255 || *endptr != '.') return strdup("0.0.0.0"); - if (domcmp(endptr + 1, ".in-addr.arpa")) { + if (in_domain(endptr + 1, "in-addr.arpa")) { b = strtol(endptr + 1, &endptr, 10); /* 1.2. */ if (errno || b < 0 || b > 255 || *endptr != '.') return strdup("0.0.0.0"); - if (domcmp(endptr + 1, ".in-addr.arpa")) { + if (in_domain(endptr + 1, "in-addr.arpa")) { c = strtol(endptr + 1, &endptr, 10); /* 1.2.3. */ if (errno || c < 0 || c > 255 || *endptr != '.') return strdup("0.0.0.0"); - if (domcmp(endptr + 1, ".in-addr.arpa")) + if (in_domain(endptr + 1, "in-addr.arpa")) return strdup("0.0.0.0"); } else { c = b; b = a; a = 0; |