From d30892cbc2f64ae31500d64aab18db6ba4daea3b Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 22 Mar 2014 16:11:32 +0000 Subject: [PATCH] [KERNEL32] Actually, given how the calls were done later on, it appears that our dear Alex was missing a ! So fix the if condition in BasepIsRealtimeAllowed, restore the previous arg name, and update the doc This should fix the calls to that function. CORE-8013 #comment Should be fixed with r62543. Please retry svn path=/trunk/; revision=62543 --- reactos/dll/win32/kernel32/client/utils.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/kernel32/client/utils.c b/reactos/dll/win32/kernel32/client/utils.c index 228690bba4a..fa476de403e 100644 --- a/reactos/dll/win32/kernel32/client/utils.c +++ b/reactos/dll/win32/kernel32/client/utils.c @@ -616,14 +616,14 @@ BaseInitializeContext(IN PCONTEXT Context, /* * Checks if the privilege for Real-Time Priority is there * Beware about this function behavior: - * - In case CheckOnly is set to TRUE, then the function will only check + * - In case Keep is set to FALSE, then the function will only check * whether real time is allowed and won't grant the privilege. In that case * it will return TRUE if allowed, FALSE otherwise. Not a state! - * It means you don't have to release privilege when calling with TRUE. + * It means you don't have to release privilege when calling with FALSE. */ PVOID WINAPI -BasepIsRealtimeAllowed(IN BOOLEAN CheckOnly) +BasepIsRealtimeAllowed(IN BOOLEAN Keep) { ULONG Privilege = SE_INC_BASE_PRIORITY_PRIVILEGE; PVOID State; @@ -632,7 +632,7 @@ BasepIsRealtimeAllowed(IN BOOLEAN CheckOnly) Status = RtlAcquirePrivilege(&Privilege, 1, 0, &State); if (!NT_SUCCESS(Status)) return NULL; - if (CheckOnly) + if (!Keep) { RtlReleasePrivilege(State); State = (PVOID)TRUE;