https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5164c852e853ba2530c55ac974799364b241b3db

commit 5164c852e853ba2530c55ac974799364b241b3db
Author:     Eric Kohl <[email protected]>
AuthorDate: Thu May 2 20:21:32 2019 +0200
Commit:     Eric Kohl <[email protected]>
CommitDate: Thu May 2 20:39:58 2019 +0200

    [POWERPROF] ValidatePowerPolicies: Do not fail because of legal power 
states which were set by FixSystemPowerState.
---
 dll/win32/powrprof/powrprof.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dll/win32/powrprof/powrprof.c b/dll/win32/powrprof/powrprof.c
index d176c2ae04..287c09769a 100644
--- a/dll/win32/powrprof/powrprof.c
+++ b/dll/win32/powrprof/powrprof.c
@@ -874,7 +874,7 @@ ValidatePowerPolicies(PGLOBAL_POWER_POLICY pGPP, 
PPOWER_POLICY pPP)
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
         }
-        if ((int)pGPP->mach.LidOpenWakeAc >= PowerSystemShutdown)
+        if ((int)pGPP->mach.LidOpenWakeAc > PowerSystemShutdown)
         {
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
@@ -884,7 +884,7 @@ ValidatePowerPolicies(PGLOBAL_POWER_POLICY pGPP, 
PPOWER_POLICY pPP)
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
         }
-        if ((int)pGPP->mach.LidOpenWakeDc >= PowerSystemShutdown)
+        if ((int)pGPP->mach.LidOpenWakeDc > PowerSystemShutdown)
         {
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
@@ -963,22 +963,22 @@ ValidatePowerPolicies(PGLOBAL_POWER_POLICY pGPP, 
PPOWER_POLICY pPP)
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
         }
-        if (pPP->mach.ReducedLatencySleepAc == PowerSystemUnspecified)
+        if ((int)pPP->mach.ReducedLatencySleepAc == PowerSystemUnspecified)
         {
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
         }
-        if ((int)pPP->mach.ReducedLatencySleepAc >= PowerSystemShutdown)
+        if ((int)pPP->mach.ReducedLatencySleepAc > PowerSystemShutdown)
         {
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
         }
-        if (pPP->mach.ReducedLatencySleepDc < PowerSystemWorking)
+        if ((int)pPP->mach.ReducedLatencySleepDc < PowerSystemWorking)
         {
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;
         }
-        if ((int)pPP->mach.ReducedLatencySleepDc >= PowerSystemShutdown)
+        if ((int)pPP->mach.ReducedLatencySleepDc > PowerSystemShutdown)
         {
             SetLastError(ERROR_GEN_FAILURE);
             return FALSE;

Reply via email to