projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
952a2f3
)
dns plugin: malloc + memset -> calloc
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Apr 2016 13:49:57 +0000
(15:49 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Fri, 1 Apr 2016 13:49:57 +0000
(15:49 +0200)
src/dns.c
patch
|
blob
|
history
diff --git
a/src/dns.c
b/src/dns.c
index
f48be00
..
53fa725
100644
(file)
--- a/
src/dns.c
+++ b/
src/dns.c
@@
-94,11
+94,10
@@
static counter_list_t *counter_list_create (counter_list_t **list,
{
counter_list_t *entry;
- entry =
malloc (
sizeof (*entry));
+ entry =
calloc (1,
sizeof (*entry));
if (entry == NULL)
return (NULL);
- memset (entry, 0, sizeof (counter_list_t));
entry->key = key;
entry->value = value;