From 2fdebf6a2996b79699d12a0525321dead86f8081 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 24 Apr 2014 12:16:21 -0300 Subject: [PATCH] Remove useless test. --- BatteryMeter.c | 3 +-- 1 file changed, 1 insertion(+), 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() {