X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_dns.c;h=991d346a4e4d034dade4423ea3ec9776747d28a4;hb=441e067a2d5a294517bd87ca45c87fd67377d2cf;hp=4c763a1420a04a4008d0d16ce4000e1da9f3aceb;hpb=40aabf444e124f40603021821e98bcc40c4aaa0e;p=collectd.git diff --git a/src/utils_dns.c b/src/utils_dns.c index 4c763a14..991d346a 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -62,9 +62,6 @@ #if HAVE_NETINET_IP6_H # include #endif -#if HAVE_NETINET_IP_COMPAT_H -# include -#endif #if HAVE_NETINET_IF_ETHER_H # include #endif @@ -159,9 +156,6 @@ typedef int (printer)(const char *, ...); /* * Global variables */ -int qtype_counts[T_MAX]; -int opcode_counts[OP_MAX]; -int qclass_counts[C_MAX]; #if HAVE_PCAP_H static pcap_t *pcap_obj = NULL; @@ -215,7 +209,7 @@ static void ignore_list_add (const struct in6_addr *addr) if (ignore_list_match (addr) != 0) return; - new = malloc (sizeof (ip_list_t)); + new = malloc (sizeof (*new)); if (new == NULL) { perror ("malloc"); @@ -421,11 +415,6 @@ handle_dns(const char *buf, int len) qh.length = (uint16_t) len; - /* gather stats */ - qtype_counts[qh.qtype]++; - qclass_counts[qh.qclass]++; - opcode_counts[qh.opcode]++; - if (Callback != NULL) Callback (&qh);