Enlightenment - BSD - Fix typos in battery sysctl float compares.

This commit is contained in:
Al 'netstar' Poole 2017-01-27 19:08:14 -06:00 committed by Stephen 'Okra' Houston
parent 82af16c32b
commit 2f218a1694
2 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ _battery_sysctl_battery_update()
}
/* This is a workaround because there's an ACPI bug */
if ((EINA_FLT_EQ(charge ==, 0.0)) || (EINA_FLT_EQ(bat->last_full_charge ==, 0.0)))
if ((EINA_FLT_EQ(charge, 0.0)) || (EINA_FLT_EQ(bat->last_full_charge, 0.0)))
{
/* last full capacity */
bat->mib[3] = 8;

View File

@ -229,7 +229,7 @@ _batman_sysctl_battery_update(Instance *inst)
bat->got_prop = 1;
_time = ecore_time_get();
if ((bat->got_prop) && (charge != bat->current_charge))
if ((bat->got_prop) && (!EINA_FLT_EQ(charge, bat->current_charge)))
bat->charge_rate = ((charge - bat->current_charge) / (_time - bat->last_update));
bat->last_update = _time;
bat->current_charge = charge;