https://git.reactos.org/?p=reactos.git;a=commitdiff;h=333eb16f308a027839f21…
commit 333eb16f308a027839f21e8144d3b39cff3e96e3
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Fri Apr 19 22:28:11 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Fri Apr 19 22:28:11 2019 +0200
[KERNEL32] GetSystemPowerStatus(): Fix coding style. No code changes!
---
dll/win32/kernel32/client/power.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/dll/win32/kernel32/client/power.c b/dll/win32/kernel32/client/power.c
index 542e4f7375..e25d25a4e2 100644
--- a/dll/win32/kernel32/client/power.c
+++ b/dll/win32/kernel32/client/power.c
@@ -35,7 +35,6 @@ GetSystemPowerStatus(IN LPSYSTEM_POWER_STATUS PowerStatus)
0,
&BattState,
sizeof(SYSTEM_BATTERY_STATE));
-
if (!NT_SUCCESS(Status))
{
BaseSetLastNTError(Status);
@@ -62,17 +61,24 @@ GetSystemPowerStatus(IN LPSYSTEM_POWER_STATUS PowerStatus)
PowerStatus->BatteryLifePercent = 100;
}
- if (PowerStatus->BatteryLifePercent <= 32) PowerStatus->BatteryFlag |=
BATTERY_FLAG_LOW;
- if (PowerStatus->BatteryLifePercent >= 67) PowerStatus->BatteryFlag |=
BATTERY_FLAG_HIGH;
+ if (PowerStatus->BatteryLifePercent <= 32)
+ PowerStatus->BatteryFlag |= BATTERY_FLAG_LOW;
+
+ if (PowerStatus->BatteryLifePercent >= 67)
+ PowerStatus->BatteryFlag |= BATTERY_FLAG_HIGH;
}
- if (!BattState.BatteryPresent) PowerStatus->BatteryFlag |=
BATTERY_FLAG_NO_BATTERY;
+ if (!BattState.BatteryPresent)
+ PowerStatus->BatteryFlag |= BATTERY_FLAG_NO_BATTERY;
- if (BattState.Charging) PowerStatus->BatteryFlag |= BATTERY_FLAG_CHARGING;
+ if (BattState.Charging)
+ PowerStatus->BatteryFlag |= BATTERY_FLAG_CHARGING;
- if (!(BattState.AcOnLine) && (BattState.BatteryPresent))
PowerStatus->ACLineStatus = AC_LINE_OFFLINE;
+ if (!(BattState.AcOnLine) && (BattState.BatteryPresent))
+ PowerStatus->ACLineStatus = AC_LINE_OFFLINE;
- if (BattState.EstimatedTime) PowerStatus->BatteryLifeTime =
BattState.EstimatedTime;
+ if (BattState.EstimatedTime)
+ PowerStatus->BatteryLifeTime = BattState.EstimatedTime;
return TRUE;
}