X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsensors.c;h=3b453b15ae1d77e203f95ac3414dfd71f15caca5;hb=2facdd7eef91949c1594f06703afeb6dd87e51cc;hp=f5b09bd29be1c501fd2a807b78eb753f14683a56;hpb=791e99923dbbf045b11fbd7b0ea8df647e29593e;p=collectd.git diff --git a/src/sensors.c b/src/sensors.c index f5b09bd2..3b453b15 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -176,7 +176,7 @@ static char *conffile = NULL; "as bug." #endif -featurelist_t *first_feature = NULL; +static featurelist_t *first_feature = NULL; static ignorelist_t *sensor_list; #if SENSORS_API_VERSION < 0x400 @@ -265,7 +265,7 @@ static int sensors_config (const char *key, const char *value) return (0); } -void sensors_free_features (void) +static void sensors_free_features (void) { featurelist_t *thisft; featurelist_t *nextft; @@ -378,7 +378,7 @@ static int sensors_load_conf (void) continue; } - fl = (featurelist_t *) malloc (sizeof (featurelist_t)); + fl = malloc (sizeof (*fl)); if (fl == NULL) { ERROR ("sensors plugin: malloc failed."); @@ -435,7 +435,7 @@ static int sensors_load_conf (void) && (subfeature->type != SENSORS_SUBFEATURE_POWER_INPUT)) continue; - fl = (featurelist_t *) malloc (sizeof (featurelist_t)); + fl = malloc (sizeof (*fl)); if (fl == NULL) { ERROR ("sensors plugin: malloc failed.");