mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOSKRNL]
Remove explicit comparisons with TRUE Patch by Love Nystrom, adjusted by me CORE-8799 svn path=/trunk/; revision=65416
This commit is contained in:
parent
f7311a5a01
commit
dfd58eda6d
15 changed files with 24 additions and 24 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue