treewide: cleanup malloc calls
[collectd.git] / src / netlink.c
index d4661ce..c5f66f8 100644 (file)
@@ -109,7 +109,7 @@ static int add_ignorelist (const char *dev, const char *type,
 {
   ir_ignorelist_t *entry;
 
-  entry = (ir_ignorelist_t *) malloc (sizeof (ir_ignorelist_t));
+  entry = malloc (sizeof (*entry));
   if (entry == NULL)
     return (-1);