diff --git a/src/dns.c b/src/dns.c
index 00fcff191e0ccf0177ec7bea309eb2964b331228..53fa725e00786ba6dede47e748a76336c4e86b91 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
* Mirko Buffoni <briareos at eswat.org>
**/
* Mirko Buffoni <briareos at eswat.org>
**/
+#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#include "collectd.h"
#define _BSD_SOURCE
#include "collectd.h"
#include <poll.h>
#include <pcap.h>
#include <poll.h>
#include <pcap.h>
-#include <pcap-bpf.h>
/*
* Private data types
/*
* Private data types
{
counter_list_t *entry;
{
counter_list_t *entry;
- entry = (counter_list_t *) malloc (sizeof (counter_list_t));
+ entry = calloc (1, sizeof (*entry));
if (entry == NULL)
return (NULL);
if (entry == NULL)
return (NULL);
- memset (entry, 0, sizeof (counter_list_t));
entry->key = key;
entry->value = value;
entry->key = key;
entry->value = value;