projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't initialize static pointers to NULL
[collectd.git]
/
src
/
barometer.c
diff --git
a/src/barometer.c
b/src/barometer.c
index
e55e3b8
..
17c2a1a
100644
(file)
--- a/
src/barometer.c
+++ b/
src/barometer.c
@@
-177,8
+177,8
@@
static const char *config_keys[] = {
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
static int config_keys_num = STATIC_ARRAY_SIZE(config_keys);
-static char *config_device
= NULL;
/**< I2C bus device */
-static int config_oversample = 1;
/**< averaging window */
+static char *config_device
;
/**< I2C bus device */
+static int config_oversample = 1; /**< averaging window */
static double config_press_offset = 0.0; /**< pressure offset */
static double config_temp_offset = 0.0; /**< temperature offset */
static double config_press_offset = 0.0; /**< pressure offset */
static double config_temp_offset = 0.0; /**< temperature offset */
@@
-235,8
+235,8
@@
typedef struct averaging_s {
int ring_buffer_head;
} averaging_t;
int ring_buffer_head;
} averaging_t;
-static averaging_t pressure_averaging
= {NULL, 0, 0L, 0}
;
-static averaging_t temperature_averaging
= {NULL, 0, 0L, 0}
;
+static averaging_t pressure_averaging;
+static averaging_t temperature_averaging;
/**
* Create / allocate averaging buffer
/**
* Create / allocate averaging buffer
@@
-317,7
+317,7
@@
typedef struct temperature_list_s {
struct temperature_list_s *next; /**< next in the list */
} temperature_list_t;
struct temperature_list_s *next; /**< next in the list */
} temperature_list_t;
-static temperature_list_t *temp_list
= NULL
;
+static temperature_list_t *temp_list;
/*
* Add new sensor to the temperature reference list
/*
* Add new sensor to the temperature reference list