Code

write_riemann: reorder host struct
[collectd.git] / src / threshold.c
index ed8312992b437c9984d6885309bc972f1450fb4d..624ab7a91dd7c14b7112e9c2884bff46c636f8d1 100644 (file)
@@ -70,7 +70,7 @@ static int ut_threshold_add (const threshold_t *th)
     return (-1);
   }
 
-  th_copy = (threshold_t *) malloc (sizeof (threshold_t));
+  th_copy = malloc (sizeof (*th_copy));
   if (th_copy == NULL)
   {
     sfree (name_copy);