diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index a439d78fb11..960803284ef 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -165,7 +165,7 @@ CcPreparePinWrite ( /* * FIXME: This is function is similar to CcPinRead, but doesn't * read the data if they're not present. Instead it should just - * prepare the VACBs and zero them out if Zero == TRUE. + * prepare the VACBs and zero them out if Zero != FALSE. * * For now calling CcPinRead is better than returning error or * just having UNIMPLEMENTED here. diff --git a/reactos/ntoskrnl/config/cmapi.c b/reactos/ntoskrnl/config/cmapi.c index dd140824663..40a830c10fc 100644 --- a/reactos/ntoskrnl/config/cmapi.c +++ b/reactos/ntoskrnl/config/cmapi.c @@ -2188,7 +2188,7 @@ CmCountOpenSubKeys(IN PCM_KEY_CONTROL_BLOCK RootKcb, /* Count the current hash entry if it is in use */ SubKeys++; } - else if ((CachedKcb->RefCount == 0) && (RemoveEmptyCacheEntries == TRUE)) + else if ((CachedKcb->RefCount == 0) && (RemoveEmptyCacheEntries != FALSE)) { /* Remove the current key from the delayed close list */ CmpRemoveFromDelayedClose(CachedKcb); diff --git a/reactos/ntoskrnl/fsrtl/fastio.c b/reactos/ntoskrnl/fsrtl/fastio.c index 174c8bc4638..d3ea273a128 100644 --- a/reactos/ntoskrnl/fsrtl/fastio.c +++ b/reactos/ntoskrnl/fsrtl/fastio.c @@ -218,7 +218,7 @@ FsRtlCopyRead(IN PFILE_OBJECT FileObject, /* File was accessed */ FileObject->Flags |= FO_FILE_FAST_IO_READ; - if (Result == TRUE) + if (Result != FALSE) { ASSERT((IoStatus->Status == STATUS_END_OF_FILE) || (((ULONGLONG)FileOffset->QuadPart + IoStatus->Information) <= @@ -227,7 +227,7 @@ FsRtlCopyRead(IN PFILE_OBJECT FileObject, } /* Update the current file offset */ - if (Result == TRUE) + if (Result != FALSE) { FileObject->CurrentByteOffset.QuadPart = FileOffset->QuadPart + IoStatus->Information; } @@ -343,7 +343,7 @@ FsRtlCopyWrite(IN PFILE_OBJECT FileObject, * If we append, use the file size as offset. * Also, check that we aren't crossing the 4GB boundary. */ - if (FileOffsetAppend == TRUE) + if (FileOffsetAppend != FALSE) { Offset.LowPart = FcbHeader->FileSize.LowPart; NewSize.LowPart = FcbHeader->FileSize.LowPart + Length; @@ -381,7 +381,7 @@ FsRtlCopyWrite(IN PFILE_OBJECT FileObject, /* Then we need to acquire the resource exclusive */ ExReleaseResourceLite(FcbHeader->Resource); ExAcquireResourceExclusiveLite(FcbHeader->Resource, TRUE); - if (FileOffsetAppend == TRUE) + if (FileOffsetAppend != FALSE) { Offset.LowPart = FcbHeader->FileSize.LowPart; // ?? NewSize.LowPart = FcbHeader->FileSize.LowPart + Length; @@ -483,7 +483,7 @@ FsRtlCopyWrite(IN PFILE_OBJECT FileObject, PsGetCurrentThread()->TopLevelIrp = 0; /* Did the operation succeed? */ - if (Result == TRUE) + if (Result != FALSE) { /* Update the valid file size if necessary */ if (NewSize.LowPart > FcbHeader->ValidDataLength.LowPart) @@ -568,7 +568,7 @@ FsRtlCopyWrite(IN PFILE_OBJECT FileObject, } /* Check if we are appending */ - if (FileOffsetAppend == TRUE) + if (FileOffsetAppend != FALSE) { Offset.QuadPart = FcbHeader->FileSize.QuadPart; NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; @@ -1338,7 +1338,7 @@ FsRtlPrepareMdlWriteDev(IN PFILE_OBJECT FileObject, } /* Check if we are appending */ - if (FileOffsetAppend == TRUE) + if (FileOffsetAppend != FALSE) { Offset.QuadPart = FcbHeader->FileSize.QuadPart; NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length; diff --git a/reactos/ntoskrnl/fstub/disksup.c b/reactos/ntoskrnl/fstub/disksup.c index f5aeb4192f1..9008f81465b 100644 --- a/reactos/ntoskrnl/fstub/disksup.c +++ b/reactos/ntoskrnl/fstub/disksup.c @@ -672,7 +672,7 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, /* Search for bootable partition */ for (j = 0; j < NUM_PARTITION_TABLE_ENTRIES && j < LayoutArray[DiskNumber]->PartitionCount; j++) { - if ((LayoutArray[DiskNumber]->PartitionEntry[j].BootIndicator == TRUE) && + if ((LayoutArray[DiskNumber]->PartitionEntry[j].BootIndicator != FALSE) && IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType)) { if (LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition == FALSE) diff --git a/reactos/ntoskrnl/include/internal/ke_x.h b/reactos/ntoskrnl/include/internal/ke_x.h index 5b2dbc900ca..11d84e4e015 100644 --- a/reactos/ntoskrnl/include/internal/ke_x.h +++ b/reactos/ntoskrnl/include/internal/ke_x.h @@ -514,7 +514,7 @@ KiTryThreadLock(IN PKTHREAD Thread) Value = InterlockedExchange((PLONG)&Thread->ThreadLock, Value); /* Return the lock state */ - return (Value == TRUE); + return (Value == 1); } FORCEINLINE diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index 9f54c174776..92a4615df8c 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -127,7 +127,7 @@ IopGetDriverObject( DriverName.Length = 0; DriverName.MaximumLength = sizeof(NameBuffer); - if (FileSystem == TRUE) + if (FileSystem != FALSE) RtlAppendUnicodeToString(&DriverName, FILESYSTEM_ROOT_NAME); else RtlAppendUnicodeToString(&DriverName, DRIVER_ROOT_NAME); @@ -494,7 +494,7 @@ IopInitializeDriverModule( /* Create ModuleName string */ if (ServiceName && ServiceName->Length > 0) { - if (FileSystemDriver == TRUE) + if (FileSystemDriver != FALSE) wcscpy(NameBuffer, FILESYSTEM_ROOT_NAME); else wcscpy(NameBuffer, DRIVER_ROOT_NAME); diff --git a/reactos/ntoskrnl/io/iomgr/file.c b/reactos/ntoskrnl/io/iomgr/file.c index febc5e517b9..74ce63fd36d 100644 --- a/reactos/ntoskrnl/io/iomgr/file.c +++ b/reactos/ntoskrnl/io/iomgr/file.c @@ -2104,7 +2104,7 @@ IoCreateFile(OUT PHANDLE FileHandle, } /* Check if we were 100% successful */ - if ((OpenPacket->ParseCheck == TRUE) && (OpenPacket->FileObject)) + if ((OpenPacket->ParseCheck != FALSE) && (OpenPacket->FileObject)) { /* Dereference the File Object */ ObDereferenceObject(OpenPacket->FileObject); @@ -2375,7 +2375,7 @@ IoFastQueryNetworkAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes, DesiredAccess, &OpenPacket, &Handle); - if (OpenPacket.ParseCheck != TRUE) + if (OpenPacket.ParseCheck == FALSE) { /* Parse failed */ IoStatus->Status = Status; @@ -3188,7 +3188,7 @@ NtDeleteFile(IN POBJECT_ATTRIBUTES ObjectAttributes) DELETE, &OpenPacket, &Handle); - if (OpenPacket.ParseCheck != TRUE) return Status; + if (OpenPacket.ParseCheck == FALSE) return Status; /* Retrn the Io status */ return OpenPacket.FinalStatus; diff --git a/reactos/ntoskrnl/kd64/kdapi.c b/reactos/ntoskrnl/kd64/kdapi.c index 5ea86413fd8..1c427922f7a 100644 --- a/reactos/ntoskrnl/kd64/kdapi.c +++ b/reactos/ntoskrnl/kd64/kdapi.c @@ -721,7 +721,7 @@ KdpSetContext(IN PDBGKD_MANIPULATE_STATE64 State, ASSERT(Data->Length == sizeof(CONTEXT)); /* Make sure that this is a valid request */ - if ((State->Processor < KeNumberProcessors) && (KdpContextSent == TRUE)) + if ((State->Processor < KeNumberProcessors) && (KdpContextSent != FALSE)) { /* Check if the request is for this CPU */ if (State->Processor == KeGetCurrentPrcb()->Number) diff --git a/reactos/ntoskrnl/ke/amd64/except.c b/reactos/ntoskrnl/ke/amd64/except.c index 2cdda75b9ba..00731e82e3b 100644 --- a/reactos/ntoskrnl/ke/amd64/except.c +++ b/reactos/ntoskrnl/ke/amd64/except.c @@ -277,7 +277,7 @@ KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, if (PreviousMode == KernelMode) { /* Check if this is a first-chance exception */ - if (FirstChance == TRUE) + if (FirstChance) { /* Break into the debugger for the first time */ if (KiDebugRoutine(TrapFrame, diff --git a/reactos/ntoskrnl/ke/arm/exp.c b/reactos/ntoskrnl/ke/arm/exp.c index ddc94a30c70..f85b8cc5dc5 100644 --- a/reactos/ntoskrnl/ke/arm/exp.c +++ b/reactos/ntoskrnl/ke/arm/exp.c @@ -218,7 +218,7 @@ KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, if (PreviousMode == KernelMode) { /* Check if this is a first-chance exception */ - if (FirstChance == TRUE) + if (FirstChance != FALSE) { /* Break into the debugger for the first time */ if (KiDebugRoutine(TrapFrame, diff --git a/reactos/ntoskrnl/ke/bug.c b/reactos/ntoskrnl/ke/bug.c index d0a3f3acf0d..c1cd54fd952 100644 --- a/reactos/ntoskrnl/ke/bug.c +++ b/reactos/ntoskrnl/ke/bug.c @@ -67,7 +67,7 @@ KiPcToFileHeader(IN PVOID Pc, i++; /* Check if this is a kernel entry and we only want drivers */ - if ((i <= 2) && (DriversOnly == TRUE)) + if ((i <= 2) && (DriversOnly != FALSE)) { /* Skip it */ NextEntry = NextEntry->Flink; diff --git a/reactos/ntoskrnl/ke/i386/exp.c b/reactos/ntoskrnl/ke/i386/exp.c index 6d3151ffdc3..7d0ff083efa 100644 --- a/reactos/ntoskrnl/ke/i386/exp.c +++ b/reactos/ntoskrnl/ke/i386/exp.c @@ -898,7 +898,7 @@ KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, if (PreviousMode == KernelMode) { /* Check if this is a first-chance exception */ - if (FirstChance == TRUE) + if (FirstChance != FALSE) { /* Break into the debugger for the first time */ if (KiDebugRoutine(TrapFrame, diff --git a/reactos/ntoskrnl/mm/ARM3/pfnlist.c b/reactos/ntoskrnl/mm/ARM3/pfnlist.c index aa7cfbe1f92..959f2612a2c 100644 --- a/reactos/ntoskrnl/mm/ARM3/pfnlist.c +++ b/reactos/ntoskrnl/mm/ARM3/pfnlist.c @@ -1183,7 +1183,7 @@ MiDecrementShareCount(IN PMMPFN Pfn1, if (Pfn1->u3.e2.ReferenceCount == 1) { /* Is there still a PFN for this page? */ - if (MI_IS_PFN_DELETED(Pfn1) == TRUE) + if (MI_IS_PFN_DELETED(Pfn1)) { /* Clear the last reference */ Pfn1->u3.e2.ReferenceCount = 0; diff --git a/reactos/ntoskrnl/mm/ARM3/session.c b/reactos/ntoskrnl/mm/ARM3/session.c index f0202841042..a0a23f20aa4 100644 --- a/reactos/ntoskrnl/mm/ARM3/session.c +++ b/reactos/ntoskrnl/mm/ARM3/session.c @@ -519,7 +519,7 @@ MiSessionInitializeWorkingSetList(VOID) OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); /* Check if we need a page table */ - if (AllocatedPageTable == TRUE) + if (AllocatedPageTable != FALSE) { /* Get a zeroed colored zero page */ Color = MI_GET_NEXT_COLOR(); diff --git a/reactos/ntoskrnl/se/priv.c b/reactos/ntoskrnl/se/priv.c index 9014fa895a1..2426dc435fd 100644 --- a/reactos/ntoskrnl/se/priv.c +++ b/reactos/ntoskrnl/se/priv.c @@ -446,7 +446,7 @@ SeAppendPrivileges(IN OUT PACCESS_STATE AccessState, PrivilegeSet->PrivilegeCount += Privileges->PrivilegeCount; /* Free the old privilege set if it was allocated */ - if (AccessState->PrivilegesAllocated == TRUE) + if (AccessState->PrivilegesAllocated != FALSE) ExFreePool(AuxData->PrivilegeSet); /* Now we are using an allocated privilege set */