X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbarometer.c;h=e1a45cd8d5715d8452b6158c9834c6472183e625;hb=a5377cf935630082f2eac2e5f4a538844cc06c8d;hp=d60f5881a7f94e00dd259f89cffcdf994b12eb07;hpb=9c8f3110063cf83fa146929d5f28f8ecf17a4ffd;p=collectd.git diff --git a/src/barometer.c b/src/barometer.c index d60f5881..e1a45cd8 100644 --- a/src/barometer.c +++ b/src/barometer.c @@ -20,6 +20,7 @@ **/ #include "collectd.h" + #include "common.h" #include "utils_cache.h" #include "plugin.h" @@ -343,9 +344,9 @@ static temperature_list_t * temp_list = NULL; */ static int temp_list_add(temperature_list_t * list, const char * sensor) { - temperature_list_t * new_temp; + temperature_list_t *new_temp; - new_temp = (temperature_list_t *) malloc(sizeof(*new_temp)); + new_temp = malloc(sizeof (*new_temp)); if(new_temp == NULL) return -1; @@ -1360,7 +1361,7 @@ static int BMP085_read(double * pressure, double * temperature) * * @return detected sensor type */ -enum Sensor_type Detect_sensor_type(void) +static enum Sensor_type detect_sensor_type(void) { if(BMP085_detect()) return Sensor_BMP085; @@ -1802,7 +1803,7 @@ static int collectd_barometer_init (void) } /* detect sensor type - this will also set slave address */ - sensor_type = Detect_sensor_type(); + sensor_type = detect_sensor_type(); /* init correct sensor type */ switch(sensor_type)