X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdns.c;h=17f879674d0eff3025d88b0035adfaa02bce627b;hb=a5377cf935630082f2eac2e5f4a538844cc06c8d;hp=53fa725e00786ba6dede47e748a76336c4e86b91;hpb=b5a33aab585aabef83c79bf3261092ca901edf9c;p=collectd.git diff --git a/src/dns.c b/src/dns.c index 53fa725e..17f87967 100644 --- a/src/dns.c +++ b/src/dns.c @@ -25,12 +25,12 @@ #define _BSD_SOURCE #include "collectd.h" + #include "common.h" #include "plugin.h" #include "configfile.h" #include "utils_dns.h" -#include #include #include @@ -211,7 +211,7 @@ static int dns_run_pcap_loop (void) { pcap_t *pcap_obj; char pcap_error[PCAP_ERRBUF_SIZE]; - struct bpf_program fp; + struct bpf_program fp = { 0 }; int status; @@ -238,7 +238,6 @@ static int dns_run_pcap_loop (void) return (PCAP_ERROR); } - memset (&fp, 0, sizeof (fp)); status = pcap_compile (pcap_obj, &fp, "udp port 53", 1, 0); if (status < 0) {