projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f36e03
)
code style
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 16 Jul 2012 08:19:29 +0000
(08:19 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 16 Jul 2012 08:19:29 +0000
(08:19 +0000)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
150b9c9
..
5824b72
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-118,23
+118,20
@@
static void print_help()
}
/*
}
/*
- Updates the size of the sensor values if different than the
- configuration.
+
*
Updates the size of the sensor values if different than the
+
*
configuration.
*/
*/
-void
+
static
void
update_psensor_values_size(struct psensor **sensors, struct config *cfg)
{
update_psensor_values_size(struct psensor **sensors, struct config *cfg)
{
- struct psensor **cur;
+ struct psensor **cur
, *s
;
- cur = sensors;
- while (*cur) {
- struct psensor *s = *cur;
+ for (cur = sensors; *cur; cur++) {
+ s = *cur;
if (s->values_max_length != cfg->sensor_values_max_length)
psensor_values_resize(s,
cfg->sensor_values_max_length);
if (s->values_max_length != cfg->sensor_values_max_length)
psensor_values_resize(s,
cfg->sensor_values_max_length);
-
- cur++;
}
}
}
}