diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2014-04-24 12:16:21 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-04-24 12:16:21 -0300 |
commit | 2fdebf6a2996b79699d12a0525321dead86f8081 (patch) | |
tree | fae01b17847f287082baa24bf63c37bfa8c2d499 /BatteryMeter.c | |
parent | 34b89a97472f033f02ae872ca557417f9cfdcd62 (diff) |
Remove useless test.
Diffstat (limited to 'BatteryMeter.c')
-rw-r--r-- | BatteryMeter.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/BatteryMeter.c b/BatteryMeter.c index c76f3837..aed5f232 100644 --- a/BatteryMeter.c +++ b/BatteryMeter.c @@ -217,8 +217,7 @@ static double getProcBatData() { if (totalRemain == 0) return 0; - double percent = totalFull > 0 ? ((double) totalRemain * 100) / (double) totalFull : 0; - return percent; + return totalRemain * 100.0 / (double) totalFull; } static double getSysBatData() { |