From: Ruben Kerkhof Date: Fri, 1 Apr 2016 13:49:57 +0000 (+0200) Subject: dns plugin: malloc + memset -> calloc X-Git-Tag: collectd-5.6.0~371^2~43 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d5cc61c7f441e41365574ad605d3173882c9936b;p=collectd.git dns plugin: malloc + memset -> calloc --- diff --git a/src/dns.c b/src/dns.c index f48be009..53fa725e 100644 --- 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;