projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1856 from rubenk/snmp-dont-dispatch-values-with-empty-type-instance
[collectd.git]
/
src
/
barometer.c
diff --git
a/src/barometer.c
b/src/barometer.c
index
e1a45cd
..
fba3450
100644
(file)
--- a/
src/barometer.c
+++ b/
src/barometer.c
@@
-408,7
+408,6
@@
static int get_reference_temperature(double * result)
gauge_t * values = NULL; /**< rate values */
size_t values_num = 0; /**< number of rate values */
gauge_t * values = NULL; /**< rate values */
size_t values_num = 0; /**< number of rate values */
- size_t i;
gauge_t values_history[REF_TEMP_AVG_NUM];
gauge_t values_history[REF_TEMP_AVG_NUM];
@@
-446,7
+445,7
@@
static int get_reference_temperature(double * result)
list->initialized = 1;
list->num_values = values_num;
list->initialized = 1;
list->num_values = values_num;
- for(i=0; i<values_num; ++i)
+ for(
size_t
i=0; i<values_num; ++i)
{
DEBUG ("barometer: get_reference_temperature - rate %zu: %lf **",
i, values[i]);
{
DEBUG ("barometer: get_reference_temperature - rate %zu: %lf **",
i, values[i]);
@@
-475,7
+474,7
@@
static int get_reference_temperature(double * result)
continue;
}
continue;
}
- for(i=0; i<REF_TEMP_AVG_NUM*list->num_values; ++i)
+ for(
size_t
i=0; i<REF_TEMP_AVG_NUM*list->num_values; ++i)
{
DEBUG ("barometer: get_reference_temperature - history %zu: %lf",
i, values_history[i]);
{
DEBUG ("barometer: get_reference_temperature - history %zu: %lf",
i, values_history[i]);
@@
-500,7
+499,7
@@
static int get_reference_temperature(double * result)
continue;
}
continue;
}
- for(i=0; i<values_num; ++i)
+ for(
size_t
i=0; i<values_num; ++i)
{
DEBUG ("barometer: get_reference_temperature - rate last %zu: %lf **",
i, values[i]);
{
DEBUG ("barometer: get_reference_temperature - rate last %zu: %lf **",
i, values[i]);
@@
-1581,8
+1580,7
@@
static int MPL115_collectd_barometer_read (void)
already available. */
if(!avg_initialized)
{
already available. */
if(!avg_initialized)
{
- int i;
- for(i=0; i<config_oversample-1; ++i)
+ for(int i=0; i<config_oversample-1; ++i)
{
result = MPL115_read_averaged(&pressure, &temperature);
if(result)
{
result = MPL115_read_averaged(&pressure, &temperature);
if(result)