projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
all plugins: remove pthread.h include
[collectd.git]
/
src
/
dns.c
diff --git
a/src/dns.c
b/src/dns.c
index
1fb7cb8
..
2c3a904
100644
(file)
--- a/
src/dns.c
+++ b/
src/dns.c
@@
-21,6
+21,7
@@
* 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"
@@
-29,7
+30,6
@@
#include "configfile.h"
#include "utils_dns.h"
#include "configfile.h"
#include "utils_dns.h"
-#include <pthread.h>
#include <poll.h>
#include <pcap.h>
#include <poll.h>
#include <pcap.h>
@@
-93,11
+93,10
@@
static counter_list_t *counter_list_create (counter_list_t **list,
{
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;