X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_dns.c;h=2a1e2e51d153b925b2aa6ba4c63b17ceb03e3db7;hb=2761915bed8c6caea41018be3e675aa712cc0b0a;hp=a1e4222f3cb2180fd1c692b86de0aaafccb82f17;hpb=b599cc64d3ba270fb9fb7116631a01b7404f1a9b;p=collectd.git diff --git a/src/utils_dns.c b/src/utils_dns.c index a1e4222f..2a1e2e51 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -37,6 +37,7 @@ #define _BSD_SOURCE #include "collectd.h" + #include "plugin.h" #include "common.h" @@ -194,9 +195,7 @@ static int cmp_in6_addr (const struct in6_addr *a, static inline int ignore_list_match (const struct in6_addr *addr) { - ip_list_t *ptr; - - for (ptr = IgnoreList; ptr != NULL; ptr = ptr->next) + for (ip_list_t *ptr = IgnoreList; ptr != NULL; ptr = ptr->next) if (cmp_in6_addr (addr, &ptr->addr) == 0) return (1); return (0); @@ -225,7 +224,6 @@ static void ignore_list_add (const struct in6_addr *addr) void ignore_list_add_name (const char *name) { struct addrinfo *ai_list; - struct addrinfo *ai_ptr; struct in6_addr addr; int status; @@ -233,7 +231,7 @@ void ignore_list_add_name (const char *name) if (status != 0) return; - for (ai_ptr = ai_list; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next) + for (struct addrinfo *ai_ptr = ai_list; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next) { if (ai_ptr->ai_family == AF_INET) {