From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:11:41 +0000 (+0200) Subject: battery plugin: remove assignment with no effect X-Git-Tag: collectd-5.6.0~329^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a8c949fc5cd7cf002ac9223c9838525dc8a25a67;p=collectd.git battery plugin: remove assignment with no effect [src/battery.c:361] -> [src/battery.c:372]: (performance) Variable 'capacity_charged' is reassigned a value before the old one has been used. --- diff --git a/src/battery.c b/src/battery.c index 0350a9eb..8a96e899 100644 --- a/src/battery.c +++ b/src/battery.c @@ -358,7 +358,7 @@ static int battery_read (void) /* {{{ */ * IOPowerSources. IOKit, on the other hand, only reports the full * capacity. We use the two to calculate the current charged capacity. */ gauge_t charge_rel = NAN; /* Current charge in percent */ - gauge_t capacity_charged = NAN; /* Charged capacity */ + gauge_t capacity_charged; /* Charged capacity */ gauge_t capacity_full = NAN; /* Total capacity */ gauge_t capacity_design = NAN; /* Full design capacity */