treewide: fix a few error messages
[collectd.git] / src / sensors.c
index f5b09bd..3b453b1 100644 (file)
@@ -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.");