diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2012-07-11 19:11:29 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2012-07-11 19:11:29 +0200 |
commit | 141f45e7928c433ddbfc63c875973448fa2fc0e8 (patch) | |
tree | 41ebac1e2d4866fc544b0393d378d8fcb50b7364 /src | |
parent | 1271ff2aa4bac659d5a24c08f86205df971a58af (diff) |
small style fix in src/print_battery_info.c (move comment)
Diffstat (limited to 'src')
-rw-r--r-- | src/print_battery_info.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/print_battery_info.c b/src/print_battery_info.c index d3a931c..3c33d3e 100644 --- a/src/print_battery_info.c +++ b/src/print_battery_info.c @@ -101,7 +101,8 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char } } - if (present_rate == -1) /* on some systems POWER_SUPPLY_POWER_NOW does not exist, so we have to calculate it */ + /* on some systems POWER_SUPPLY_POWER_NOW does not exist, so we have to calculate it */ + if (present_rate == -1) present_rate = ((float)voltage / 1000.0) * ((float)current / 1000.0); if ((full_design == -1) || (remaining == -1)) { |