From d8b68f3d7b7f6343bbc3179ea75e6e8bf6afb58f Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 13 Nov 2014 11:00:41 +0000 Subject: [PATCH] [FREELDR] Remove explicit comparisons with TRUE i.e. if (BooleanValue == TRUE) -> if (BooleanValue) (and not !BooleanValue as accidentally written in the previous commit message!) Patch by Love Nystrom CORE-8799 svn path=/trunk/; revision=65391 --- reactos/boot/freeldr/freeldr/cache/blocklist.c | 2 +- reactos/boot/freeldr/freeldr/cache/cache.c | 4 ++-- reactos/boot/freeldr/freeldr/linuxboot.c | 2 +- reactos/boot/freeldr/freeldr/reactos/registry.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/cache/blocklist.c b/reactos/boot/freeldr/freeldr/cache/blocklist.c index fa0fdffad28..1b4c37a6866 100644 --- a/reactos/boot/freeldr/freeldr/cache/blocklist.c +++ b/reactos/boot/freeldr/freeldr/cache/blocklist.c @@ -149,7 +149,7 @@ BOOLEAN CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive) // that isn't forced to be in the cache and remove // it from the list CacheBlockToFree = CONTAINING_RECORD(CacheDrive->CacheBlockHead.Blink, CACHE_BLOCK, ListEntry); - while (&CacheBlockToFree->ListEntry != &CacheDrive->CacheBlockHead && CacheBlockToFree->LockedInCache == TRUE) + while (&CacheBlockToFree->ListEntry != &CacheDrive->CacheBlockHead && CacheBlockToFree->LockedInCache) { CacheBlockToFree = CONTAINING_RECORD(CacheBlockToFree->ListEntry.Blink, CACHE_BLOCK, ListEntry); } diff --git a/reactos/boot/freeldr/freeldr/cache/cache.c b/reactos/boot/freeldr/freeldr/cache/cache.c index 105a3c46129..92f52375547 100644 --- a/reactos/boot/freeldr/freeldr/cache/cache.c +++ b/reactos/boot/freeldr/freeldr/cache/cache.c @@ -42,10 +42,10 @@ BOOLEAN CacheInitializeDrive(UCHAR DriveNumber) // If we already have a cache for this drive then // by all means lets keep it, unless it is a removable // drive, in which case we'll invalidate the cache - if ((CacheManagerInitialized == TRUE) && + if ((CacheManagerInitialized) && (DriveNumber == CacheManagerDrive.DriveNumber) && (DriveNumber >= 0x80) && - (CacheManagerDataInvalid != TRUE)) + (!CacheManagerDataInvalid)) { return TRUE; } diff --git a/reactos/boot/freeldr/freeldr/linuxboot.c b/reactos/boot/freeldr/freeldr/linuxboot.c index f7cb5bfe17f..7d431d5ae10 100644 --- a/reactos/boot/freeldr/freeldr/linuxboot.c +++ b/reactos/boot/freeldr/freeldr/linuxboot.c @@ -451,7 +451,7 @@ BOOLEAN LinuxCheckKernelVersion(VOID) LinuxSetupSector->LoadFlags |= LINUX_FLAG_CAN_USE_HEAP; } - if ((NewStyleLinuxKernel == FALSE) && (LinuxHasInitrd == TRUE)) + if ((NewStyleLinuxKernel == FALSE) && (LinuxHasInitrd)) { UiMessageBox("Error: Cannot load a ramdisk (initrd) with an old kernel image."); return FALSE; diff --git a/reactos/boot/freeldr/freeldr/reactos/registry.c b/reactos/boot/freeldr/freeldr/reactos/registry.c index d88688a92b6..5733d183fc5 100644 --- a/reactos/boot/freeldr/freeldr/reactos/registry.c +++ b/reactos/boot/freeldr/freeldr/reactos/registry.c @@ -119,7 +119,7 @@ RegInitCurrentControlSet( return Error; } - CurrentSet = (LastKnownGood == TRUE) ? LastKnownGoodSet : DefaultSet; + CurrentSet = (LastKnownGood) ? LastKnownGoodSet : DefaultSet; wcscpy(ControlSetKeyName, L"ControlSet"); switch(CurrentSet) {