ipmi plugin: remove unneccesary cast
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 15 Dec 2018 17:41:58 +0000 (18:41 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 15 Dec 2018 18:40:14 +0000 (19:40 +0100)
src/ipmi.c

index fb99bad..15909c2 100644 (file)
@@ -476,7 +476,7 @@ static int sensor_list_add(c_ipmi_instance_t *st, ipmi_sensor_t *sensor) {
     return 0;
   }
 
-  list_item = (c_ipmi_sensor_list_t *)calloc(1, sizeof(c_ipmi_sensor_list_t));
+  list_item = calloc(1, sizeof(*list_item));
   if (list_item == NULL) {
     pthread_mutex_unlock(&st->sensor_list_lock);
     return -1;