summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c382b5)
raw | patch | inline | side by side (parent: 3c382b5)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 10:11:41 +0000 (12:11 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 10:11:41 +0000 (12:11 +0200) |
[src/battery.c:361] -> [src/battery.c:372]: (performance) Variable 'capacity_charged' is reassigned a value before the old one has been used.
src/battery.c | patch | blob | history |
diff --git a/src/battery.c b/src/battery.c
index 0350a9eb1dae3b84bffdf84b6ebf2b33a27e48ed..8a96e8990f672e6ba98fed8d7d067dc905254f59 100644 (file)
--- a/src/battery.c
+++ b/src/battery.c
* 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 */