daemon: malloc + memset -> calloc
[collectd.git] / src / daemon / utils_llist.c
index 40dd0ea..1a6188f 100644 (file)
@@ -48,12 +48,10 @@ llist_t *llist_create (void)
 {
        llist_t *ret;
 
-       ret = malloc (sizeof (*ret));
+       ret = calloc (1, sizeof (*ret));
        if (ret == NULL)
                return (NULL);
 
-       memset (ret, '\0', sizeof (llist_t));
-
        return (ret);
 }