Store DNS server count in resolv_cache.
Instead of keeping a sentinel after nameservers[], nsaddrinfo[] and
nstats[], store the server count in the structure, freeing up memory and
eliminating the need to enumerate the server count every time
_resolv_is_nameservers_equal_locked() is invoked.
Also increase MAXNS from 3 to 4.
BUG: 28153323
Change-Id: I11a7257af695157c9e32019cd00c67b535b63c75
diff --git a/libc/dns/resolv/res_state.c b/libc/dns/resolv/res_state.c
index afccd99..0e02a8f 100644
--- a/libc/dns/resolv/res_state.c
+++ b/libc/dns/resolv/res_state.c
@@ -128,7 +128,7 @@
rt->_pi = (struct prop_info*) __system_property_find("net.change");
if (rt->_pi == NULL) {
/* Still nothing, return current state */
- D("%s: exiting for tid=%d rt=%d since system property not found",
+ D("%s: exiting for tid=%d rt=%p since system property not found",
__FUNCTION__, gettid(), rt);
return rt;
}