diff options
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/res_hconf.c | 5 | ||||
-rw-r--r-- | resolv/res_init.c | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c index b4c86227f8..fc9cba4d7b 100644 --- a/resolv/res_hconf.c +++ b/resolv/res_hconf.c @@ -386,7 +386,6 @@ void _res_hconf_reorder_addrs (struct hostent *hp) { #if defined SIOCGIFCONF && defined SIOCGIFNETMASK - int i, j; /* Number of interfaces. */ static int num_ifs = -1; /* We need to protect the dynamic buffer handling. */ @@ -474,11 +473,11 @@ _res_hconf_reorder_addrs (struct hostent *hp) return; /* Find an address for which we have a direct connection. */ - for (i = 0; hp->h_addr_list[i]; ++i) + for (int i = 0; hp->h_addr_list[i]; ++i) { struct in_addr *haddr = (struct in_addr *) hp->h_addr_list[i]; - for (j = 0; j < num_ifs; ++j) + for (int j = 0; j < num_ifs; ++j) { u_int32_t if_addr = ifaddrs[j].u.ipv4.addr; u_int32_t if_netmask = ifaddrs[j].u.ipv4.mask; diff --git a/resolv/res_init.c b/resolv/res_init.c index ea133f8d82..c80d282696 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -477,14 +477,14 @@ __res_vinit(res_state statp, int preinit) { static void internal_function -res_setoptions(res_state statp, const char *options, const char *source) { - const char *cp = options; +res_setoptions(res_state statp, const char *opts, const char *source) { + const char *cp = opts; int i; #ifdef DEBUG if (statp->options & RES_DEBUG) printf(";; res_setoptions(\"%s\", \"%s\")...\n", - options, source); + opts, source); #endif while (*cp) { /* skip leading and inner runs of spaces */ @@ -545,7 +545,6 @@ res_setoptions(res_state statp, const char *options, const char *source) { { STRnLEN ("use-vc"), 0, RES_USEVC } }; #define noptions (sizeof (options) / sizeof (options[0])) - int i; for (i = 0; i < noptions; ++i) if (strncmp (cp, options[i].str, options[i].len) == 0) { |