treewide: cleanup malloc calls
[collectd.git] / src / dns.c
index 3421c47..f48be00 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -94,7 +94,7 @@ static counter_list_t *counter_list_create (counter_list_t **list,
 {
        counter_list_t *entry;
 
-       entry = (counter_list_t *) malloc (sizeof (counter_list_t));
+       entry = malloc (sizeof (*entry));
        if (entry == NULL)
                return (NULL);