From: Ruben Kerkhof Date: Fri, 4 Mar 2016 17:06:23 +0000 (+0100) Subject: utils-dns: remove unused code X-Git-Tag: collectd-5.6.0~451^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=89c1baad28cab48a5875c0082ce9ad168081a088;p=collectd.git utils-dns: remove unused code --- diff --git a/src/utils_dns.c b/src/utils_dns.c index 71a14d87..2c7a59d3 100644 --- a/src/utils_dns.c +++ b/src/utils_dns.c @@ -156,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; @@ -418,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); diff --git a/src/utils_dns.h b/src/utils_dns.h index 83f0ea40..ef7de0a6 100644 --- a/src/utils_dns.h +++ b/src/utils_dns.h @@ -48,8 +48,6 @@ #define DNS_MSG_HDR_SZ 12 #define T_MAX 65536 -#define OP_MAX 16 -#define C_MAX 65536 #define MAX_QNAME_SZ 512 struct rfc1035_header_s { @@ -75,10 +73,6 @@ struct rfc1035_header_s { }; typedef struct rfc1035_header_s rfc1035_header_t; -extern int qtype_counts[T_MAX]; -extern int opcode_counts[OP_MAX]; -extern int qclass_counts[C_MAX]; - #if HAVE_PCAP_H void dnstop_set_pcap_obj (pcap_t *po); #endif