treewide: cleanup malloc calls
[collectd.git] / src / ping.c
index da63d3a..b6b2b68 100644 (file)
@@ -483,7 +483,7 @@ static int ping_config (const char *key, const char *value) /* {{{ */
     hostlist_t *hl;
     char *host;
 
-    hl = (hostlist_t *) malloc (sizeof (hostlist_t));
+    hl = malloc (sizeof (*hl));
     if (hl == NULL)
     {
       char errbuf[1024];