X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fmain.c;h=5824b7247a1eb96100f31e37af68415cbfe025e9;hb=30c42b84c3367924fec067a2f4863815a85472d7;hp=150b9c94134de26e14f4a5b41bfbf73a446179ac;hpb=1f36e03dc2b29c96701e5721d9a64711378597a3;p=psensor.git diff --git a/src/main.c b/src/main.c index 150b9c9..5824b72 100644 --- 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) { - 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); - - cur++; } }