Grep'ing for [ \t]*==[ \t]*TRUE and [ \t]*!=[ \t]*TRUE revealed some 400
matches..
That's *400 potential malfunctions begging to happen*, as previously
concluded.
If you *must*, for some obscure reason, code an explicit truth-value
comparison,
for God's sake make it (boolVal != FALSE) or (boolVal == FALSE), which
is safe,
because a BOOL has 2^32-2 TRUE values !!!
However, the more efficient "if ( boolVal )" and "if ( !boolVal )"
ought
to be *mandatory*.
I do hope nobody will challenge that "if ( boolVal )" equals "if (
boolVal != FALSE )",
and does *not* equal "if ( boolVal == TRUE )", when boolVal is BOOL or
BOOLEAN...
I've patched all those potential errors against the current trunk.
In most cases a simple removal of "== TRUE" was sufficient, however in
asserts I replaced it with "!= FALSE", since that may be clearer when
triggered.
The only places I let it pass was in pure debug strings and comments.
As this is a *fairly extensive patch*, I would very much appreciate if a
*prioritized regression test* could be run by you guys who do such things,
since this may actually fix some "mysterious" malfunctions, or introduce
bugs that did not trigger in my alpha test.
My own alpha test was limited to building and installing it on VMware
Player 6,
and concluding that "it appears to run without obvious malfunctions".
*Actually, when compared to a pre-patch build, one "mysterious" crash
disappeared!*
The patch has been submitted as bug CORE-8799, and is also included
inline in this post.
Best Regards
// Love
===============================================================================
Index: base/applications/calc/utl.c
===================================================================
--- base/applications/calc/utl.c (revision 65379)
+++ base/applications/calc/utl.c (working copy)
@@ -19,7 +19,7 @@
#define MAX_LD_WIDTH 16
/* calculate the width of integer number */
width = (rpn->f==0) ? 1 : (int)log10(fabs(rpn->f))+1;
- if (calc.sci_out == TRUE || width > MAX_LD_WIDTH || width <
-MAX_LD_WIDTH)
+ if (calc.sci_out || width > MAX_LD_WIDTH || width < -MAX_LD_WIDTH)
_stprintf(buffer, TEXT("%#e"), rpn->f);
else {
TCHAR *ptr, *dst;
Index: base/applications/calc/utl_mpfr.c
===================================================================
--- base/applications/calc/utl_mpfr.c (revision 65379)
+++ base/applications/calc/utl_mpfr.c (working copy)
@@ -39,7 +39,7 @@
width = 1 + mpfr_get_si(t, MPFR_DEFAULT_RND);
mpfr_clear(t);
}
- if (calc.sci_out == TRUE || width > max_ld_width || width <
-max_ld_width)
+ if (calc.sci_out || width > max_ld_width || width < -max_ld_width)
ptr = temp + gmp_sprintf(temp, "%*.*#Fe", 1, max_ld_width,
ff);
else {
ptr = temp + gmp_sprintf(temp, "%#*.*Ff", width,
((max_ld_width-width-1)>=0) ? max_ld_width-width-1 : 0, ff);
Index: base/applications/calc/winmain.c
===================================================================
--- base/applications/calc/winmain.c (revision 65379)
+++ base/applications/calc/winmain.c (working copy)
@@ -290,7 +290,7 @@
_stprintf(buf, TEXT("%lu"), calc.layout);
WriteProfileString(TEXT("SciCalc"), TEXT("layout"), buf);
- WriteProfileString(TEXT("SciCalc"), TEXT("UseSep"),
(calc.usesep==TRUE) ? TEXT("1") : TEXT("0"));
+ WriteProfileString(TEXT("SciCalc"), TEXT("UseSep"), (calc.usesep)
?
TEXT("1") : TEXT("0"));
}
static LRESULT post_key_press(LPARAM lParam, WORD idc)
@@ -1107,7 +1107,7 @@
static void run_fe(calc_number_t *number)
{
- calc.sci_out = ((calc.sci_out == TRUE) ? FALSE : TRUE);
+ calc.sci_out = ((calc.sci_out) ? FALSE : TRUE);
}
static void handle_context_menu(HWND hWnd, WPARAM wp, LPARAM lp)
Index: base/applications/charmap/settings.c
===================================================================
--- base/applications/charmap/settings.c (revision 65379)
+++ base/applications/charmap/settings.c (working copy)
@@ -91,7 +91,7 @@
RegQueryValueEx(hKey, _T("Advanced"), NULL, &type,
(LPBYTE)&dwAdvanChecked, &size);
- if(dwAdvanChecked == TRUE)
+ if(dwAdvanChecked)
SendDlgItemMessage(hCharmapDlg, IDC_CHECK_ADVANCED,
BM_CLICK, MF_CHECKED, 0);
RegCloseKey(hKey);
Index: base/applications/cmdutils/more/more.c
===================================================================
--- base/applications/cmdutils/more/more.c (revision 65379)
+++ base/applications/cmdutils/more/more.c (working copy)
@@ -63,7 +63,7 @@
{
ReadConsoleInput (hKeyboard, &ir, 1, &dwRead);
if ((ir.EventType == KEY_EVENT) &&
- (ir.Event.KeyEvent.bKeyDown == TRUE))
+ (ir.Event.KeyEvent.bKeyDown))
return;
}
while (TRUE);
Index: base/applications/mscutils/servman/start.c
===================================================================
--- base/applications/mscutils/servman/start.c (revision 65379)
+++ base/applications/mscutils/servman/start.c (working copy)
@@ -41,7 +41,7 @@
}
else
{
- if (bWhiteSpace == TRUE)
+ if (bWhiteSpace)
{
dwArgsCount++;
bWhiteSpace = FALSE;
@@ -72,7 +72,7 @@
}
else
{
- if (bWhiteSpace == TRUE)
+ if (bWhiteSpace)
{
lpArgsVector[dwArgsCount] = lpChar;
dwArgsCount++;
Index: base/applications/network/arp/arp.c
===================================================================
--- base/applications/network/arp/arp.c (revision 65379)
+++ base/applications/network/arp/arp.c (working copy)
@@ -467,7 +467,7 @@
pDelHost->dwIndex = pIpNetTable->table[0].dwIndex;
}
- if (bFlushTable == TRUE)
+ if (bFlushTable)
{
/* delete arp cache */
if (FlushIpNetTable(pDelHost->dwIndex) != NO_ERROR)
Index: base/applications/network/net/cmdAccounts.c
===================================================================
--- base/applications/network/net/cmdAccounts.c (revision 65379)
+++ base/applications/network/net/cmdAccounts.c (working copy)
@@ -151,7 +151,7 @@
}
}
- if (Modified == TRUE)
+ if (Modified)
{
Status = NetUserModalsSet(NULL, 0, (LPBYTE)Info0, &ParamErr);
if (Status != NERR_Success)
Index: base/applications/network/net/cmdUser.c
===================================================================
--- base/applications/network/net/cmdUser.c (revision 65379)
+++ base/applications/network/net/cmdUser.c (working copy)
@@ -612,7 +612,7 @@
}
done:
- if (bPasswordAllocated == TRUE && lpPassword != NULL)
+ if (bPasswordAllocated && lpPassword != NULL)
HeapFree(GetProcessHeap(), 0, lpPassword);
if (!bAdd && !bDelete && pUserInfo != NULL)
Index: base/applications/network/tracert/tracert.c
===================================================================
--- base/applications/network/tracert/tracert.c (revision 65379)
+++ base/applications/network/tracert/tracert.c (working copy)
@@ -450,7 +450,7 @@
/* run until we hit either max hops, or find the target */
while ((iHopCount <= pInfo->iMaxHops) &&
- (bFoundTarget != TRUE))
+ (!bFoundTarget))
{
USHORT iSeqNum = 0;
INT i;
@@ -460,7 +460,7 @@
/* run 3 pings for each hop */
for (i = 0; i < 3; i++)
{
- if (SetTTL(pInfo->icmpSock, iTTL) != TRUE)
+ if ( !SetTTL( pInfo->icmpSock, iTTL ))
{
DebugPrint(_T("error in Setup()\n"));
return ret;
Index: base/applications/notepad/dialog.c
===================================================================
--- base/applications/notepad/dialog.c (revision 65379)
+++ base/applications/notepad/dialog.c (working copy)
@@ -744,8 +744,7 @@
}
// Set status bar visible or not accordind the the settings.
- if (Globals.bWrapLongLines == TRUE ||
- Globals.bShowStatusBar == FALSE)
+ if (Globals.bWrapLongLines || !Globals.bShowStatusBar)
{
bStatusBarVisible = FALSE;
ShowWindow(Globals.hStatusBar, SW_HIDE);
@@ -758,7 +757,7 @@
}
// Set check state in show status bar item.
- if (Globals.bShowStatusBar == TRUE)
+ if (Globals.bShowStatusBar)
{
CheckMenuItem(Globals.hMenu, CMD_STATUSBAR, MF_BYCOMMAND |
MF_CHECKED);
}
Index: base/applications/notepad/main.c
===================================================================
--- base/applications/notepad/main.c (revision 65379)
+++ base/applications/notepad/main.c (working copy)
@@ -371,8 +371,7 @@
case WM_SIZE:
{
- if (Globals.bShowStatusBar == TRUE &&
- Globals.bWrapLongLines == FALSE)
+ if (Globals.bShowStatusBar && !Globals.bWrapLongLines)
{
RECT rcStatusBar;
HDWP hdwp;
Index: base/applications/regedit/edit.c
===================================================================
--- base/applications/regedit/edit.c (revision 65379)
+++ base/applications/regedit/edit.c (working copy)
@@ -1271,7 +1271,7 @@
{
}
}
- else if (EditBin == TRUE || type == REG_NONE || type == REG_BINARY)
+ else if (EditBin || type == REG_NONE || type == REG_BINARY)
{
if(valueDataLen > 0)
{
Index: base/applications/sndrec32/sndrec32.cpp
===================================================================
--- base/applications/sndrec32/sndrec32.cpp (revision 65379)
+++ base/applications/sndrec32/sndrec32.cpp (working copy)
@@ -534,7 +534,7 @@
case WM_COMMAND:
wmId = LOWORD(wParam);
- if ((wmId >= 0) && (wmId < 5) && (butdisabled[wmId] ==
TRUE))
+ if ((wmId >= 0) && (wmId < 5) && (butdisabled[wmId]))
break;
switch (wmId)
Index: base/applications/sndvol32/dialog.c
===================================================================
--- base/applications/sndvol32/dialog.c (revision 65379)
+++ base/applications/sndvol32/dialog.c (working copy)
@@ -366,7 +366,7 @@
SetDlgItemTextW(PrefContext->MixerWindow->hWnd, wID,
Line->szName);
/* query controls */
- if (SndMixerQueryControls(Mixer, &ControlCount, Line,
&Control) == TRUE)
+ if (SndMixerQueryControls(Mixer, &ControlCount, Line,
&Control))
{
/* now go through all controls and update their
states */
for(Index = 0; Index < ControlCount; Index++)
Index: base/services/eventlog/file.c
===================================================================
--- base/services/eventlog/file.c (revision 65379)
+++ base/services/eventlog/file.c (working copy)
@@ -248,7 +248,7 @@
}
/* if OvewrWrittenRecords is TRUE and this record has already
been read */
- if ((OvewrWrittenRecords == TRUE) && (RecBuf->RecordNumber ==
LogFile->Header.OldestRecordNumber))
+ if ((OvewrWrittenRecords) && (RecBuf->RecordNumber ==
LogFile->Header.OldestRecordNumber))
{
HeapFree(MyHeap, 0, RecBuf);
break;
@@ -447,7 +447,7 @@
return;
if ((ForceClose == FALSE) &&
- (LogFile->Permanent == TRUE))
+ (LogFile->Permanent))
return;
RtlAcquireResourceExclusive(&LogFile->Lock, TRUE);
@@ -829,7 +829,7 @@
goto Done;
}
- if (Ansi == TRUE)
+ if (Ansi)
{
if (!ReadAnsiLogEntry(LogFile->hFile, Buffer, dwRecSize, &dwRead))
{
@@ -888,7 +888,7 @@
goto Done;
}
- if (Ansi == TRUE)
+ if (Ansi)
{
if (!ReadAnsiLogEntry(LogFile->hFile,
Buffer + dwBufferUsage,
Index: base/services/eventlog/rpc.c
===================================================================
--- base/services/eventlog/rpc.c (revision 65379)
+++ base/services/eventlog/rpc.c (working copy)
@@ -81,7 +81,7 @@
}
/* If Creating, default to the Application Log in case we fail, as
documented on MSDN */
- if (Create == TRUE)
+ if (Create)
{
pEventSource = GetEventSourceByName(Name);
DPRINT("EventSource: %p\n", pEventSource);
Index: base/services/svchost/svchost.c
===================================================================
--- base/services/svchost/svchost.c (revision 65379)
+++ base/services/svchost/svchost.c (working copy)
@@ -666,7 +666,7 @@
ULONG_PTR ulCookie = 0;
/* Activate the context */
- if (ActivateActCtx(pDll->hActCtx, &ulCookie) != TRUE)
+ if ( !ActivateActCtx( pDll->hActCtx, &ulCookie ))
{
/* We couldn't, bail out */
if (lpdwError) *lpdwError = GetLastError();
@@ -1211,7 +1211,7 @@
pOptions->AuthenticationLevel,
pOptions->ImpersonationLevel,
pOptions->AuthenticationCapabilities);
- if (bResult != TRUE) return FALSE;
+ if (!bResult) return FALSE;
}
/* Do we have a custom RPC stack size? */
Index: base/setup/usetup/interface/consup.c
===================================================================
--- base/setup/usetup/interface/consup.c (revision 65379)
+++ base/setup/usetup/interface/consup.c (working copy)
@@ -69,7 +69,7 @@
ReadConsoleInput(StdInput, Buffer, 1, &Read);
if ((Buffer->EventType == KEY_EVENT)
- && (Buffer->Event.KeyEvent.bKeyDown == TRUE))
+ && (Buffer->Event.KeyEvent.bKeyDown))
break;
}
}
Index: base/setup/usetup/interface/usetup.c
===================================================================
--- base/setup/usetup/interface/usetup.c (revision 65379)
+++ base/setup/usetup/interface/usetup.c (working copy)
@@ -246,7 +246,7 @@
if (Length > MaxLength)
MaxLength = Length;
- if (LastLine == TRUE)
+ if (LastLine)
break;
pnext = p + 1;
@@ -312,7 +312,7 @@
&Written);
}
- if (LastLine == TRUE)
+ if (LastLine)
break;
coPos.Y++;
@@ -676,7 +676,7 @@
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
else
RedrawGenericList(LanguageList);
@@ -922,7 +922,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -1025,7 +1025,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -1062,7 +1062,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -1179,7 +1179,7 @@
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -1233,7 +1233,7 @@
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -1284,7 +1284,7 @@
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
{
return QUIT_PAGE;
}
@@ -1337,7 +1337,7 @@
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -1398,7 +1398,7 @@
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -1484,8 +1484,8 @@
DrawPartitionList(PartitionList);
/* Warn about partitions created by Linux Fdisk */
- if (WarnLinuxPartitions == TRUE &&
- CheckForLinuxFdiskPartitions(PartitionList) == TRUE)
+ if (WarnLinuxPartitions &&
+ CheckForLinuxFdiskPartitions(PartitionList))
{
MUIDisplayError(ERROR_WARN_PARTITION, NULL, POPUP_WAIT_NONE);
@@ -1585,7 +1585,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
{
DestroyPartitionList(PartitionList);
PartitionList = NULL;
@@ -1660,7 +1660,7 @@
}
else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'L') /* L */
{
- if (PartitionList->CurrentPartition->LogicalPartition == TRUE)
+ if (PartitionList->CurrentPartition->LogicalPartition)
{
Error = LogicalPartitionCreationChecks(PartitionList);
if (Error != NOT_AN_ERROR)
@@ -1921,14 +1921,14 @@
ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left,
top, right, bottom */
MaxSize, InputBuffer, &Quit, &Cancel);
- if (Quit == TRUE)
+ if (Quit)
{
- if (ConfirmQuit (Ir) == TRUE)
+ if (ConfirmQuit (Ir))
{
return QUIT_PAGE;
}
}
- else if (Cancel == TRUE)
+ else if (Cancel)
{
return SELECT_PARTITION_PAGE;
}
@@ -2068,14 +2068,14 @@
ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left,
top, right, bottom */
MaxSize, InputBuffer, &Quit, &Cancel);
- if (Quit == TRUE)
+ if (Quit)
{
- if (ConfirmQuit (Ir) == TRUE)
+ if (ConfirmQuit (Ir))
{
return QUIT_PAGE;
}
}
- else if (Cancel == TRUE)
+ else if (Cancel)
{
return SELECT_PARTITION_PAGE;
}
@@ -2214,14 +2214,14 @@
ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left,
top, right, bottom */
MaxSize, InputBuffer, &Quit, &Cancel);
- if (Quit == TRUE)
+ if (Quit)
{
- if (ConfirmQuit (Ir) == TRUE)
+ if (ConfirmQuit (Ir))
{
return QUIT_PAGE;
}
}
- else if (Cancel == TRUE)
+ else if (Cancel)
{
return SELECT_PARTITION_PAGE;
}
@@ -2295,11 +2295,11 @@
/* Determine partition type */
PartType = NULL;
- if (PartEntry->New == TRUE)
+ if (PartEntry->New)
{
PartType = MUIGetString(STRING_UNFORMATTED);
}
- else if (PartEntry->IsPartitioned == TRUE)
+ else if (PartEntry->IsPartitioned)
{
if ((PartEntry->PartitionType == PARTITION_FAT_12) ||
(PartEntry->PartitionType == PARTITION_FAT_16) ||
@@ -2416,7 +2416,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
{
return QUIT_PAGE;
}
@@ -2517,7 +2517,7 @@
PartType = MUIGetString(STRING_FORMATUNKNOWN);
}
- if (PartEntry->AutoCreate == TRUE)
+ if (PartEntry->AutoCreate)
{
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NEWPARTITION));
@@ -2543,7 +2543,7 @@
PartEntry->AutoCreate = FALSE;
}
- else if (PartEntry->New == TRUE)
+ else if (PartEntry->New)
{
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NONFORMATTEDPART));
CONSOLE_SetTextXY(6, 10, MUIGetString(STRING_PARTFORMAT));
@@ -2622,7 +2622,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
{
return QUIT_PAGE;
}
@@ -2698,7 +2698,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
{
return QUIT_PAGE;
}
@@ -2779,7 +2779,7 @@
{
PartEntry = CONTAINING_RECORD(Entry, PARTENTRY,
ListEntry);
- if (PartEntry->IsPartitioned == TRUE)
+ if (PartEntry->IsPartitioned)
{
CONSOLE_PrintTextXY(6, Line,
"%2u: %2u %c %12I64u
%12I64u %2u %c",
@@ -3007,7 +3007,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -3793,7 +3793,7 @@
InstallOnFloppy = TRUE;
}
- if (InstallOnFloppy == TRUE)
+ if (InstallOnFloppy)
{
return BOOT_LOADER_FLOPPY_PAGE;
}
@@ -3842,7 +3842,7 @@
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
@@ -3890,7 +3890,7 @@
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
{
- if (ConfirmQuit(Ir) == TRUE)
+ if (ConfirmQuit(Ir))
return QUIT_PAGE;
break;
Index: base/setup/usetup/partlist.c
===================================================================
--- base/setup/usetup/partlist.c (revision 65379)
+++ base/setup/usetup/partlist.c (working copy)
@@ -531,7 +531,7 @@
PartitionInfo =
&DiskEntry->LayoutBuffer->PartitionEntry[PartitionIndex];
if (PartitionInfo->PartitionType == 0 ||
- (LogicalPartition == TRUE &&
IsContainerPartition(PartitionInfo->PartitionType)))
+ (LogicalPartition &&
IsContainerPartition(PartitionInfo->PartitionType)))
return;
PartEntry = RtlAllocateHeap(ProcessHeap,
@@ -1497,11 +1497,11 @@
{
/* Determine partition type */
PartType = NULL;
- if (PartEntry->New == TRUE)
+ if (PartEntry->New)
{
PartType = MUIGetString(STRING_UNFORMATTED);
}
- else if (PartEntry->IsPartitioned == TRUE)
+ else if (PartEntry->IsPartitioned)
{
if ((PartEntry->PartitionType == PARTITION_FAT_12) ||
(PartEntry->PartitionType == PARTITION_FAT_16) ||
@@ -2054,7 +2054,7 @@
{
/* Primary or extended partition */
- if (List->CurrentPartition->IsPartitioned == TRUE &&
+ if (List->CurrentPartition->IsPartitioned &&
IsContainerPartition(List->CurrentPartition->PartitionType))
{
/* First logical partition */
@@ -2148,7 +2148,7 @@
{
PartEntry = CONTAINING_RECORD(PartListEntry,
PARTENTRY, ListEntry);
- if (PartEntry->IsPartitioned == TRUE &&
+ if (PartEntry->IsPartitioned &&
IsContainerPartition(PartEntry->PartitionType))
{
PartListEntry =
List->CurrentDisk->LogicalPartListHead.Blink;
@@ -2173,7 +2173,7 @@
{
PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY,
ListEntry);
- if (PartEntry->IsPartitioned == TRUE &&
+ if (PartEntry->IsPartitioned &&
IsContainerPartition(PartEntry->PartitionType))
{
PartListEntry = DiskEntry->LogicalPartListHead.Blink;
@@ -2250,7 +2250,7 @@
{
PartEntry = CONTAINING_RECORD(ListEntry, PARTENTRY, ListEntry);
- if (PartEntry->IsPartitioned == TRUE)
+ if (PartEntry->IsPartitioned)
{
PartitionInfo =
&DiskEntry->LayoutBuffer->PartitionEntry[Index];
@@ -2363,7 +2363,7 @@
if (List == NULL ||
List->CurrentDisk == NULL ||
List->CurrentPartition == NULL ||
- List->CurrentPartition->IsPartitioned == TRUE)
+ List->CurrentPartition->IsPartitioned)
{
return;
}
@@ -2373,7 +2373,7 @@
DPRINT1("Current partition sector count: %I64u\n",
PartEntry->SectorCount.QuadPart);
- if (AutoCreate == TRUE ||
+ if (AutoCreate ||
Align(PartEntry->StartSector.QuadPart + SectorCount,
DiskEntry->SectorAlignment) - PartEntry->StartSector.QuadPart ==
PartEntry->SectorCount.QuadPart)
{
DPRINT1("Convert existing partition entry\n");
@@ -2482,7 +2482,7 @@
if (List == NULL ||
List->CurrentDisk == NULL ||
List->CurrentPartition == NULL ||
- List->CurrentPartition->IsPartitioned == TRUE)
+ List->CurrentPartition->IsPartitioned)
{
return;
}
@@ -2592,7 +2592,7 @@
if (List == NULL ||
List->CurrentDisk == NULL ||
List->CurrentPartition == NULL ||
- List->CurrentPartition->IsPartitioned == TRUE)
+ List->CurrentPartition->IsPartitioned)
{
return;
}
@@ -2756,7 +2756,7 @@
ListEntry);
/* Set active boot partition */
- if ((DiskEntry->NewDisk == TRUE) ||
+ if ((DiskEntry->NewDisk) ||
(PartEntry->BootIndicator == FALSE))
{
PartEntry->BootIndicator = TRUE;
@@ -2942,7 +2942,7 @@
{
DiskEntry = CONTAINING_RECORD(Entry, DISKENTRY, ListEntry);
- if (DiskEntry->Dirty == TRUE)
+ if (DiskEntry->Dirty)
{
WritePartitons(List, DiskEntry);
}
@@ -3016,7 +3016,7 @@
while (Entry != &DiskEntry->PrimaryPartListHead)
{
PartEntry = CONTAINING_RECORD(Entry, PARTENTRY, ListEntry);
- if (PartEntry->IsPartitioned == TRUE)
+ if (PartEntry->IsPartitioned)
nCount++;
Entry = Entry->Flink;
@@ -3037,7 +3037,7 @@
PartEntry = List->CurrentPartition;
/* Fail if partition is already in use */
- if (PartEntry->IsPartitioned == TRUE)
+ if (PartEntry->IsPartitioned)
return ERROR_NEW_PARTITION;
/* Fail if there are more than 4 partitions in the list */
@@ -3059,7 +3059,7 @@
PartEntry = List->CurrentPartition;
/* Fail if partition is already in use */
- if (PartEntry->IsPartitioned == TRUE)
+ if (PartEntry->IsPartitioned)
return ERROR_NEW_PARTITION;
/* Fail if there are more than 4 partitions in the list */
@@ -3085,7 +3085,7 @@
PartEntry = List->CurrentPartition;
/* Fail if partition is already in use */
- if (PartEntry->IsPartitioned == TRUE)
+ if (PartEntry->IsPartitioned)
return ERROR_NEW_PARTITION;
return ERROR_SUCCESS;
Index: base/setup/vmwinst/vmwinst.c
===================================================================
--- base/setup/vmwinst/vmwinst.c (revision 65379)
+++ base/setup/vmwinst/vmwinst.c (working copy)
@@ -234,7 +234,7 @@
/* If this key is absent, just get current settings */
memset(&CurrentDevMode, 0, sizeof(CurrentDevMode));
CurrentDevMode.dmSize = sizeof(CurrentDevMode);
- if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS,
&CurrentDevMode) == TRUE)
+ if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS,
&CurrentDevMode))
{
*ColDepth = CurrentDevMode.dmBitsPerPel;
*ResX = CurrentDevMode.dmPelsWidth;
Index: base/shell/cmd/choice.c
===================================================================
--- base/shell/cmd/choice.c (revision 65379)
+++ base/shell/cmd/choice.c (working copy)
@@ -56,7 +56,7 @@
//if the event is a key pressed
if ((lpBuffer.EventType == KEY_EVENT) &&
- (lpBuffer.Event.KeyEvent.bKeyDown == TRUE))
+ (lpBuffer.Event.KeyEvent.bKeyDown))
{
//read the key
#ifdef _UNICODE
Index: base/shell/cmd/color.c
===================================================================
--- base/shell/cmd/color.c (revision 65379)
+++ base/shell/cmd/color.c (working copy)
@@ -36,7 +36,7 @@
return FALSE;
/* Fill the whole background if needed */
- if (bNoFill != TRUE)
+ if (!bNoFill)
{
GetConsoleScreenBufferInfo(hConsole, &csbi);
Index: base/shell/cmd/console.c
===================================================================
--- base/shell/cmd/console.c (revision 65379)
+++ base/shell/cmd/console.c (working copy)
@@ -90,7 +90,7 @@
{
ReadConsoleInput(hInput, lpBuffer, 1, &dwRead);
if ((lpBuffer->EventType == KEY_EVENT) &&
- (lpBuffer->Event.KeyEvent.bKeyDown == TRUE))
+ (lpBuffer->Event.KeyEvent.bKeyDown))
break;
}
while (TRUE);
@@ -294,7 +294,7 @@
int from = 0, i = 0;
- if (NewPage == TRUE)
+ if (NewPage)
LineCount = 0;
/* rest LineCount and return if no string have been given */
Index: base/shell/cmd/dir.c
===================================================================
--- base/shell/cmd/dir.c (revision 65379)
+++ base/shell/cmd/dir.c (working copy)
@@ -713,7 +713,7 @@
#endif
if (pGetFreeDiskSpaceEx != NULL)
{
- if (pGetFreeDiskSpaceEx(lpRoot, lpFreeSpace,
&TotalNumberOfBytes, &TotalNumberOfFreeBytes) == TRUE)
+ if (pGetFreeDiskSpaceEx(lpRoot, lpFreeSpace,
&TotalNumberOfBytes, &TotalNumberOfFreeBytes))
return;
}
}
@@ -1348,7 +1348,7 @@
do
{
/*If retrieved FileName has extension,and szPath doesnt
have extension then JUMP the retrieved FileName*/
- if (_tcschr(wfdFileInfo.cFileName,_T('.'))&&(fPoint==TRUE))
+ if (_tcschr(wfdFileInfo.cFileName,_T('.'))&&(fPoint))
{
continue;
/* Here we filter all the specified attributes */
Index: base/shell/cmd/misc.c
===================================================================
--- base/shell/cmd/misc.c (revision 65379)
+++ base/shell/cmd/misc.c (working copy)
@@ -48,7 +48,7 @@
{
ReadConsoleInput (hInput, &irBuffer, 1, &dwRead);
if ((irBuffer.EventType == KEY_EVENT) &&
- (irBuffer.Event.KeyEvent.bKeyDown == TRUE))
+ (irBuffer.Event.KeyEvent.bKeyDown))
{
if (irBuffer.Event.KeyEvent.dwControlKeyState &
(LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
Index: base/shell/cmd/ren.c
===================================================================
--- base/shell/cmd/ren.c (revision 65379)
+++ base/shell/cmd/ren.c (working copy)
@@ -286,7 +286,7 @@
}
*r = 0;
//Well we have splitted the Paths,so now we have to paste them
again(if needed),thanks bPath.
- if (bPath == TRUE)
+ if (bPath)
{
_tcscpy(srcFinal,srcPath);
_tcscat(srcFinal,f.cFileName);
Index: base/shell/explorer/explorer.cpp
===================================================================
--- base/shell/explorer/explorer.cpp (revision 65379)
+++ base/shell/explorer/explorer.cpp (working copy)
@@ -814,7 +814,7 @@
if (!_path.empty())
return false;
- if((SelectOpt == TRUE) && (PathFileExists(option)))
+ if((SelectOpt) && (PathFileExists(option)))
{
WCHAR szDir[MAX_PATH];
Index: base/system/autochk/autochk.c
===================================================================
--- base/system/autochk/autochk.c (revision 65379)
+++ base/system/autochk/autochk.c (working copy)
@@ -234,7 +234,7 @@
case DONE:
Status = (PBOOLEAN)Argument;
- if (*Status == TRUE)
+ if (*Status)
{
PrintString("Autochk was unable to complete
successfully.\r\n\r\n");
// Error = TRUE;
Index: base/system/diskpart/interpreter.c
===================================================================
--- base/system/diskpart/interpreter.c (revision 65379)
+++ base/system/diskpart/interpreter.c (working copy)
@@ -114,7 +114,7 @@
}
else
{
- if ((bWhiteSpace == TRUE) && (args_count < MAX_ARGS_COUNT))
+ if ((bWhiteSpace) && (args_count < MAX_ARGS_COUNT))
{
args_vector[args_count] = ptr;
args_count++;
@@ -147,7 +147,7 @@
BOOL bRun = TRUE;
LPWSTR ptr;
- while (bRun == TRUE)
+ while (bRun)
{
args_count = 0;
memset(args_vector, 0, sizeof(args_vector));
@@ -168,7 +168,7 @@
}
else
{
- if ((bWhiteSpace == TRUE) && (args_count < MAX_ARGS_COUNT))
+ if ((bWhiteSpace) && (args_count < MAX_ARGS_COUNT))
{
args_vector[args_count] = ptr;
args_count++;
Index: base/system/services/database.c
===================================================================
--- base/system/services/database.c (revision 65379)
+++ base/system/services/database.c (working copy)
@@ -639,7 +639,7 @@
ServiceEntry = ServiceEntry->Flink;
- if (CurrentService->bDeleted == TRUE)
+ if (CurrentService->bDeleted)
{
dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
L"System\\CurrentControlSet\\Services",
Index: base/system/services/driver.c
===================================================================
--- base/system/services/driver.c (revision 65379)
+++ base/system/services/driver.c (working copy)
@@ -215,7 +215,7 @@
return RtlNtStatusToDosError(Status);
}
- if ((bFound == TRUE) &&
+ if ((bFound) &&
(lpService->Status.dwCurrentState != SERVICE_STOP_PENDING))
{
if (lpService->Status.dwCurrentState == SERVICE_STOPPED)
Index: base/system/services/services.c
===================================================================
--- base/system/services/services.c (revision 65379)
+++ base/system/services/services.c (working copy)
@@ -430,7 +430,7 @@
done:
/* Delete our communication named pipe's critical section */
- if (bCanDeleteNamedPipeCriticalSection == TRUE)
+ if (bCanDeleteNamedPipeCriticalSection)
ScmDeleteNamedPipeCriticalSection();
/* Close the shutdown event */
Index: base/system/smss/pagefile.c
===================================================================
--- base/system/smss/pagefile.c (revision 65379)
+++ base/system/smss/pagefile.c (working copy)
@@ -985,7 +985,7 @@
}
/* We must've found at least the boot volume */
- ASSERT(BootVolumeFound == TRUE);
+ ASSERT(BootVolumeFound != FALSE);
ASSERT(!IsListEmpty(&SmpVolumeDescriptorList));
if (!IsListEmpty(&SmpVolumeDescriptorList)) return STATUS_SUCCESS;
Index: boot/freeldr/freeldr/cache/blocklist.c
===================================================================
--- boot/freeldr/freeldr/cache/blocklist.c (revision 65379)
+++ boot/freeldr/freeldr/cache/blocklist.c (working copy)
@@ -149,7 +149,7 @@
// 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);
}
Index: boot/freeldr/freeldr/cache/cache.c
===================================================================
--- boot/freeldr/freeldr/cache/cache.c (revision 65379)
+++ boot/freeldr/freeldr/cache/cache.c (working copy)
@@ -42,10 +42,10 @@
// 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 == FALSE))
{
return TRUE;
}
Index: boot/freeldr/freeldr/linuxboot.c
===================================================================
--- boot/freeldr/freeldr/linuxboot.c (revision 65379)
+++ boot/freeldr/freeldr/linuxboot.c (working copy)
@@ -451,7 +451,7 @@
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;
Index: boot/freeldr/freeldr/reactos/registry.c
===================================================================
--- boot/freeldr/freeldr/reactos/registry.c (revision 65379)
+++ boot/freeldr/freeldr/reactos/registry.c (working copy)
@@ -119,7 +119,7 @@
return Error;
}
- CurrentSet = (LastKnownGood == TRUE) ? LastKnownGoodSet : DefaultSet;
+ CurrentSet = (LastKnownGood) ? LastKnownGoodSet : DefaultSet;
wcscpy(ControlSetKeyName, L"ControlSet");
switch(CurrentSet)
{
Index: dll/cpl/desk/background.c
===================================================================
--- dll/cpl/desk/background.c (revision 65379)
+++ dll/cpl/desk/background.c (working copy)
@@ -495,10 +495,10 @@
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
- if (GetOpenFileName(&ofn) == TRUE)
+ if (GetOpenFileName(&ofn))
{
/* Check if there is already a entry that holds this filename */
- if (CheckListViewFilenameExists(hwndBackgroundList,
ofn.lpstrFileTitle) == TRUE)
+ if (CheckListViewFilenameExists(hwndBackgroundList,
ofn.lpstrFileTitle))
return;
if (pData->listViewItemCount > (MAX_BACKGROUNDS - 1))
@@ -558,7 +558,7 @@
pData->pWallpaperBitmap = NULL;
}
- if (backgroundItem->bWallpaper == TRUE)
+ if (backgroundItem->bWallpaper)
{
pData->pWallpaperBitmap =
DibLoadImage(backgroundItem->szFilename);
@@ -748,7 +748,7 @@
RegCloseKey(regKey);
- if (pData->backgroundItems[pData->backgroundSelection].bWallpaper
== TRUE)
+ if (pData->backgroundItems[pData->backgroundSelection].bWallpaper)
{
SystemParametersInfo(SPI_SETDESKWALLPAPER,
0,
Index: dll/cpl/main/mouse.c
===================================================================
--- dll/cpl/main/mouse.c (revision 65379)
+++ dll/cpl/main/mouse.c (working copy)
@@ -1717,7 +1717,7 @@
SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED,
(LPARAM)0);
/* Set the default scroll lines value */
- if (bInit == TRUE)
+ if (bInit)
SetDlgItemInt(hwndDlg, IDC_EDIT_WHEEL_SCROLL_LINES,
DEFAULT_WHEEL_SCROLL_LINES, FALSE);
}
}
Index: dll/cpl/mmsys/sounds.c
===================================================================
--- dll/cpl/mmsys/sounds.c (revision 65379)
+++ dll/cpl/mmsys/sounds.c (working copy)
@@ -959,7 +959,7 @@
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
- if (GetOpenFileNameW(&ofn) == TRUE)
+ if (GetOpenFileNameW(&ofn))
{
// FIXME search if list already contains that
sound
Index: dll/cpl/sysdm/advanced.c
===================================================================
--- dll/cpl/sysdm/advanced.c (revision 65379)
+++ dll/cpl/sysdm/advanced.c (working copy)
@@ -68,7 +68,7 @@
(LPBYTE)&dwVal,
&cbData) == ERROR_SUCCESS)
{
- if (dwVal == TRUE)
+ if (dwVal)
{
// set the check box
SendDlgItemMessageW(hwndDlg,
Index: dll/cpl/sysdm/virtmem.c
===================================================================
--- dll/cpl/sysdm/virtmem.c (revision 65379)
+++ dll/cpl/sysdm/virtmem.c (working copy)
@@ -598,7 +598,7 @@
static VOID
OnOk(PVIRTMEM pVirtMem)
{
- if (pVirtMem->bModified == TRUE)
+ if (pVirtMem->bModified)
{
ResourceMessageBox(hApplet,
NULL,
Index: dll/directx/d3d9/adapter.c
===================================================================
--- dll/directx/d3d9/adapter.c (revision 65379)
+++ dll/directx/d3d9/adapter.c (working copy)
@@ -158,7 +158,7 @@
AdapterIndex = 0;
FoundDisplayDevice = FALSE;
- while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0)
== TRUE)
+ while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0))
{
if (_stricmp(lpszDeviceName, DisplayDevice.DeviceName) == 0)
{
@@ -176,7 +176,7 @@
lstrcpynA(pIdentifier->Description, DisplayDevice.DeviceString,
MAX_DEVICE_IDENTIFIER_STRING);
lstrcpynA(pIdentifier->DeviceName, DisplayDevice.DeviceName,
CCHDEVICENAME);
- if (GetDriverName(&DisplayDevice, pIdentifier) == TRUE)
+ if (GetDriverName(&DisplayDevice, pIdentifier))
GetDriverVersion(&DisplayDevice, pIdentifier);
GetDeviceId(DisplayDevice.DeviceID, pIdentifier);
Index: dll/directx/d3d9/d3d9_create.c
===================================================================
--- dll/directx/d3d9/d3d9_create.c (revision 65379)
+++ dll/directx/d3d9/d3d9_create.c (working copy)
@@ -190,7 +190,7 @@
D3D9_PrimaryDeviceName[0] = '\0';
AdapterIndex = 0;
- while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0)
== TRUE &&
+ while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) &&
pDirect3D9->NumDisplayAdapters < D3D9_INT_MAX_NUM_ADAPTERS)
{
if ((DisplayDevice.StateFlags & (DISPLAY_DEVICE_DISCONNECT |
DISPLAY_DEVICE_MIRRORING_DRIVER)) == 0 &&
@@ -209,7 +209,7 @@
}
AdapterIndex = 0;
- while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0)
== TRUE &&
+ while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) &&
pDirect3D9->NumDisplayAdapters < D3D9_INT_MAX_NUM_ADAPTERS)
{
if ((DisplayDevice.StateFlags &
DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0 &&
Index: dll/directx/d3d9/d3d9_impl.c
===================================================================
--- dll/directx/d3d9/d3d9_impl.c (revision 65379)
+++ dll/directx/d3d9/d3d9_impl.c (working copy)
@@ -413,7 +413,7 @@
}
if (BackBufferFormat == D3DFMT_UNKNOWN &&
- Windowed == TRUE)
+ Windowed)
{
BackBufferFormat = DisplayFormat;
}
@@ -595,7 +595,7 @@
}
pDriverCaps = &This->DisplayAdapters[Adapter].DriverCaps;
- if ((Usage & D3DUSAGE_DYNAMIC) != 0 && bIsTextureRType == TRUE)
+ if ((Usage & D3DUSAGE_DYNAMIC) != 0 && bIsTextureRType)
{
if ((pDriverCaps->DriverCaps9.Caps2 &
D3DCAPS2_DYNAMICTEXTURES) == 0)
{
Index: dll/directx/ddraw/Ddraw/ddraw_displaymode.c
===================================================================
--- dll/directx/ddraw/Ddraw/ddraw_displaymode.c (revision 65379)
+++ dll/directx/ddraw/Ddraw/ddraw_displaymode.c (working copy)
@@ -42,7 +42,7 @@
DevMode.dmSize = sizeof(DEVMODE);
- while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE)
+ while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0))
{
DDSURFACEDESC SurfaceDesc;
@@ -140,7 +140,7 @@
DevMode.dmSize = sizeof(DEVMODE);
- while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE)
+ while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0))
{
DDSURFACEDESC2 SurfaceDesc;
Index: dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
===================================================================
--- dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c (revision 65379)
+++ dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c (working copy)
@@ -112,7 +112,7 @@
}
}
- if (found == TRUE)
+ if (found)
{
/* we found our driver now we start setup it */
if
(!_strnicmp(DisplayDeviceA.DeviceKey,"\\REGISTRY\\Machine\\",18))
Index: dll/directx/dsound_new/directsound.c
===================================================================
--- dll/directx/dsound_new/directsound.c (revision 65379)
+++ dll/directx/dsound_new/directsound.c (working copy)
@@ -34,7 +34,7 @@
LPCDirectSoundImpl This =
(LPCDirectSoundImpl)CONTAINING_RECORD(iface, CDirectSoundImpl, lpVtbl);
if ((IsEqualIID(riid, &IID_IDirectSound) && This->bDirectSound8 ==
FALSE) ||
- (IsEqualIID(riid, &IID_IDirectSound8) && This->bDirectSound8 ==
TRUE) ||
+ (IsEqualIID(riid, &IID_IDirectSound8) && This->bDirectSound8 !=
FALSE) ||
(IsEqualIID(riid, &IID_IUnknown)))
{
*ppobj = (LPVOID)&This->lpVtbl;
Index: dll/directx/wine/dsound/mixer.c
===================================================================
--- dll/directx/wine/dsound/mixer.c (revision 65379)
+++ dll/directx/wine/dsound/mixer.c (working copy)
@@ -945,7 +945,7 @@
}
/* if device was stopping, its for sure stopped when all
buffers have stopped */
- else if((all_stopped == TRUE) && (device->state ==
STATE_STOPPING)){
+ else if((all_stopped) && (device->state == STATE_STOPPING)){
TRACE("All buffers have stopped. Stopping primary buffer\n");
device->state = STATE_STOPPED;
Index: dll/win32/advapi32/misc/shutdown.c
===================================================================
--- dll/win32/advapi32/misc/shutdown.c (revision 65379)
+++ dll/win32/advapi32/misc/shutdown.c (working copy)
@@ -132,7 +132,7 @@
{
/* FIXME: Right now, only basic shutting down and rebooting
is supported */
- if(bRebootAfterShutdown == TRUE)
+ if(bRebootAfterShutdown)
{
action = ShutdownReboot;
}
Index: dll/win32/advapi32/reg/reg.c
===================================================================
--- dll/win32/advapi32/reg/reg.c (revision 65379)
+++ dll/win32/advapi32/reg/reg.c (working copy)
@@ -3195,7 +3195,7 @@
return ERROR_INVALID_HANDLE;
}
- if (fAsynchronous == TRUE && hEvent == NULL)
+ if (fAsynchronous && hEvent == NULL)
{
return ERROR_INVALID_PARAMETER;
}
Index: dll/win32/advapi32/sec/misc.c
===================================================================
--- dll/win32/advapi32/sec/misc.c (revision 65379)
+++ dll/win32/advapi32/sec/misc.c (working copy)
@@ -214,7 +214,7 @@
&NewToken,
sizeof(HANDLE));
- if (Duplicated == TRUE)
+ if (Duplicated)
{
NtClose(NewToken);
}
Index: dll/win32/advapi32/service/scm.c
===================================================================
--- dll/win32/advapi32/service/scm.c (revision 65379)
+++ dll/win32/advapi32/service/scm.c (working copy)
@@ -2120,7 +2120,7 @@
return FALSE;
}
- if (bUseTempBuffer == TRUE)
+ if (bUseTempBuffer)
{
TRACE("RQueryServiceConfig2A() returns
ERROR_INSUFFICIENT_BUFFER\n");
*pcbBytesNeeded = dwBufferSize;
@@ -2238,7 +2238,7 @@
return FALSE;
}
- if (bUseTempBuffer == TRUE)
+ if (bUseTempBuffer)
{
TRACE("RQueryServiceConfig2W() returns
ERROR_INSUFFICIENT_BUFFER\n");
*pcbBytesNeeded = dwBufferSize;
Index: dll/win32/advapi32/service/sctrl.c
===================================================================
--- dll/win32/advapi32/service/sctrl.c (revision 65379)
+++ dll/win32/advapi32/service/sctrl.c (working copy)
@@ -463,7 +463,7 @@
lpService->hServiceStatus = ControlPacket->hServiceStatus;
/* Build the arguments vector */
- if (lpService->bUnicode == TRUE)
+ if (lpService->bUnicode)
{
dwError = ScBuildUnicodeArgsVector(ControlPacket,
&lpService->ThreadParams.W.dwArgCount,
Index: dll/win32/jscript/regexp.c
===================================================================
--- dll/win32/jscript/regexp.c (revision 65379)
+++ dll/win32/jscript/regexp.c (working copy)
@@ -2119,7 +2119,7 @@
assert(charSet->sense == FALSE);
++src;
} else {
- assert(charSet->sense == TRUE);
+ assert(charSet->sense != FALSE);
}
while (src != end) {
Index: dll/win32/kernel32/client/appcache.c
===================================================================
--- dll/win32/kernel32/client/appcache.c (revision 65379)
+++ dll/win32/kernel32/client/appcache.c (working copy)
@@ -58,7 +58,7 @@
if ((NT_SUCCESS(Status)) &&
(KeyInfo.Type == REG_DWORD) &&
(KeyInfo.DataLength == sizeof(ULONG)) &&
- (KeyInfo.Data[0] == TRUE))
+ (KeyInfo.Data[0]))
{
/* It is, so disable shims! */
g_ShimsEnabled = TRUE;
@@ -80,7 +80,7 @@
if ((NT_SUCCESS(Status)) &&
(KeyInfo.Type == REG_DWORD) &&
(KeyInfo.DataLength == sizeof(ULONG)) &&
- (KeyInfo.Data[0] == TRUE))
+ (KeyInfo.Data[0]))
{
/* It is, so disable shims! */
g_ShimsEnabled = TRUE;
@@ -102,7 +102,7 @@
if ((NT_SUCCESS(Status)) &&
(KeyInfo.Type == REG_DWORD) &&
(KeyInfo.DataLength == sizeof(ULONG)) &&
- (KeyInfo.Data[0] == TRUE))
+ (KeyInfo.Data[0]))
{
/* It does, so disable shims! */
g_ShimsEnabled = TRUE;
Index: dll/win32/kernel32/client/console/init.c
===================================================================
--- dll/win32/kernel32/client/console/init.c (revision 65379)
+++ dll/win32/kernel32/client/console/init.c (working copy)
@@ -353,7 +353,7 @@
else if (Reason == DLL_PROCESS_DETACH)
{
/* Free our resources */
- if (ConsoleInitialized == TRUE)
+ if (ConsoleInitialized)
{
if (ConsoleApplet) FreeLibrary(ConsoleApplet);
Index: dll/win32/kernel32/client/dllmain.c
===================================================================
--- dll/win32/kernel32/client/dllmain.c (revision 65379)
+++ dll/win32/kernel32/client/dllmain.c (working copy)
@@ -217,7 +217,7 @@
case DLL_PROCESS_DETACH:
{
- if (DllInitialized == TRUE)
+ if (DllInitialized)
{
/* Uninitialize console support */
ConDllInitialize(dwReason, NULL);
Index: dll/win32/kernel32/client/power.c
===================================================================
--- dll/win32/kernel32/client/power.c (revision 65379)
+++ dll/win32/kernel32/client/power.c (working copy)
@@ -89,7 +89,7 @@
Status = NtInitiatePowerAction((fSuspend != FALSE) ?
PowerActionSleep : PowerActionHibernate,
(fSuspend != FALSE) ?
PowerSystemSleeping1 : PowerSystemHibernate,
- fForce != TRUE,
+ ! fForce,
FALSE);
if (!NT_SUCCESS(Status))
{
Index: dll/win32/kernel32/client/proc.c
===================================================================
--- dll/win32/kernel32/client/proc.c (revision 65379)
+++ dll/win32/kernel32/client/proc.c (working copy)
@@ -1228,7 +1228,7 @@
if (!NT_SUCCESS(Status))
{
/* We failed, was this because this is a VDM process? */
- if (BaseCheckForVDM(hProcess, lpExitCode) == TRUE) return TRUE;
+ if (BaseCheckForVDM(hProcess, lpExitCode)) return TRUE;
/* Not a VDM process, fail the call */
BaseSetLastNTError(Status);
Index: dll/win32/lsasrv/authport.c
===================================================================
--- dll/win32/lsasrv/authport.c (revision 65379)
+++ dll/win32/lsasrv/authport.c (working copy)
@@ -97,7 +97,7 @@
TRACE("Logon Process Name: %s\n",
RequestMsg->ConnectInfo.LogonProcessNameBuffer);
- if (RequestMsg->ConnectInfo.CreateContext == TRUE)
+ if (RequestMsg->ConnectInfo.CreateContext)
{
Status = LsapCheckLogonProcess(RequestMsg,
&LogonContext);
@@ -129,7 +129,7 @@
return Status;
}
- if (Accept == TRUE)
+ if (Accept)
{
if (LogonContext != NULL)
{
Index: dll/win32/lsasrv/lsarpc.c
===================================================================
--- dll/win32/lsasrv/lsarpc.c (revision 65379)
+++ dll/win32/lsasrv/lsarpc.c (working copy)
@@ -1384,8 +1384,8 @@
TRACE("(%p %u %p)\n", AccountHandle, AllPrivileges, Privileges);
/* */
- if ((AllPrivileges == FALSE && Privileges == NULL) ||
- (AllPrivileges == TRUE && Privileges != NULL))
+ if (( !AllPrivileges && Privileges == NULL) ||
+ (AllPrivileges && Privileges != NULL))
return STATUS_INVALID_PARAMETER;
/* Validate the AccountHandle */
@@ -1399,7 +1399,7 @@
return Status;
}
- if (AllPrivileges == TRUE)
+ if (AllPrivileges)
{
/* Delete the Privilgs attribute */
Status = LsapDeleteObjectAttribute(AccountObject,
Index: dll/win32/lsasrv/privileges.c
===================================================================
--- dll/win32/lsasrv/privileges.c (revision 65379)
+++ dll/win32/lsasrv/privileges.c (working copy)
@@ -231,7 +231,7 @@
}
}
- if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE))
+ if ((Status == STATUS_SUCCESS) && (MoreEntries))
Status = STATUS_MORE_ENTRIES;
return Status;
Index: dll/win32/msgina/gui.c
===================================================================
--- dll/win32/msgina/gui.c (revision 65379)
+++ dll/win32/msgina/gui.c (working copy)
@@ -534,7 +534,7 @@
SetDlgItemTextW(hwnd, IDC_LOGONDATE, Buffer4);
- if (pgContext->bAutoAdminLogon == TRUE)
+ if (pgContext->bAutoAdminLogon)
EnableWindow(GetDlgItem(hwnd, IDC_LOGOFF), FALSE);
}
@@ -1118,7 +1118,7 @@
if (pgContext->bDontDisplayLastUserName == FALSE)
SetDlgItemTextW(hwndDlg, IDC_USERNAME,
pgContext->UserName);
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), FALSE);
if (pgContext->bShutdownWithoutLogon == FALSE)
@@ -1377,7 +1377,7 @@
SetDlgItemTextW(hwndDlg, IDC_USERNAME, pgContext->UserName);
SetFocus(GetDlgItem(hwndDlg, IDC_PASSWORD));
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
EnableWindow(GetDlgItem(hwndDlg, IDCANCEL), FALSE);
pgContext->hBitmap = LoadImage(hDllInstance,
MAKEINTRESOURCE(IDI_ROSLOGO), IMAGE_BITMAP, 0, 0, LR_DEFAULTCOLOR);
Index: dll/win32/msgina/msgina.c
===================================================================
--- dll/win32/msgina/msgina.c (revision 65379)
+++ dll/win32/msgina/msgina.c (working copy)
@@ -911,7 +911,7 @@
}
result = CreateProfile(pgContext, UserName, Domain, Password);
- if (result == TRUE)
+ if (result)
{
ZeroMemory(pgContext->Password, 256 * sizeof(WCHAR));
wcscpy(pgContext->Password, Password);
@@ -952,7 +952,7 @@
return;
}
- if (pgContext->bAutoAdminLogon == TRUE)
+ if (pgContext->bAutoAdminLogon)
{
/* Don't display the window, we want to do an automatic logon */
pgContext->AutoLogonState = AUTOLOGON_ONCE;
@@ -962,7 +962,7 @@
else
pgContext->AutoLogonState = AUTOLOGON_DISABLED;
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
{
pgContext->pWlxFuncs->WlxSasNotify(pgContext->hWlx,
WLX_SAS_TYPE_CTRL_ALT_DEL);
return;
@@ -1043,7 +1043,7 @@
TRACE("WlxDisplayLockedNotice()\n");
- if (pgContext->bDisableCAD == TRUE)
+ if (pgContext->bDisableCAD)
{
pgContext->pWlxFuncs->WlxSasNotify(pgContext->hWlx,
WLX_SAS_TYPE_CTRL_ALT_DEL);
return;
Index: dll/win32/msports/classinst.c
===================================================================
--- dll/win32/msports/classinst.c (revision 65379)
+++ dll/win32/msports/classinst.c (working copy)
@@ -91,7 +91,7 @@
if (hDeviceKey)
RegCloseKey(hDeviceKey);
- if (ret == TRUE)
+ if (ret)
*ppResourceList = (PCM_RESOURCE_LIST)lpBuffer;
return ret;
Index: dll/win32/msv1_0/msv1_0.c
===================================================================
--- dll/win32/msv1_0/msv1_0.c (revision 65379)
+++ dll/win32/msv1_0/msv1_0.c (working copy)
@@ -1223,7 +1223,7 @@
if (!NT_SUCCESS(Status))
{
- if (SessionCreated == TRUE)
+ if (SessionCreated)
DispatchTable.DeleteLogonSession(LogonId);
if (*ProfileBuffer != NULL)
Index: dll/win32/netapi32/user.c
===================================================================
--- dll/win32/netapi32/user.c (revision 65379)
+++ dll/win32/netapi32/user.c (working copy)
@@ -2479,7 +2479,7 @@
if (EnumContext->Index >= EnumContext->Count)
{
-// if (EnumContext->BuiltinDone == TRUE)
+// if (EnumContext->BuiltinDone)
// {
// ApiStatus = NERR_Success;
// goto done;
Index: dll/win32/samsrv/samrpc.c
===================================================================
--- dll/win32/samsrv/samrpc.c (revision 65379)
+++ dll/win32/samsrv/samrpc.c (working copy)
@@ -2232,7 +2232,7 @@
SampRegCloseKey(&NamesKeyHandle);
SampRegCloseKey(&GroupsKeyHandle);
- if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE))
+ if ((Status == STATUS_SUCCESS) && (MoreEntries))
Status = STATUS_MORE_ENTRIES;
RtlReleaseResource(&SampResource);
@@ -2843,7 +2843,7 @@
SampRegCloseKey(&NamesKeyHandle);
SampRegCloseKey(&UsersKeyHandle);
- if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE))
+ if ((Status == STATUS_SUCCESS) && (MoreEntries))
Status = STATUS_MORE_ENTRIES;
RtlReleaseResource(&SampResource);
@@ -3224,7 +3224,7 @@
SampRegCloseKey(&NamesKeyHandle);
SampRegCloseKey(&AliasesKeyHandle);
- if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE))
+ if ((Status == STATUS_SUCCESS) && (MoreEntries))
Status = STATUS_MORE_ENTRIES;
RtlReleaseResource(&SampResource);
@@ -7815,7 +7815,7 @@
Buffer->All.SecurityDescriptor.Length);
}
- if (WriteFixedData == TRUE)
+ if (WriteFixedData)
{
Status = SampSetObjectAttribute(UserObject,
L"F",
Index: dll/win32/samsrv/setup.c
===================================================================
--- dll/win32/samsrv/setup.c (revision 65379)
+++ dll/win32/samsrv/setup.c (working copy)
@@ -762,7 +762,7 @@
goto done;
/* Create the server SD */
- if (bBuiltinDomain == TRUE)
+ if (bBuiltinDomain)
Status = SampCreateBuiltinDomainSD(&Sd,
&SdSize);
else
Index: dll/win32/serialui/serialui.c
===================================================================
--- dll/win32/serialui/serialui.c (revision 65379)
+++ dll/win32/serialui/serialui.c (working copy)
@@ -309,7 +309,7 @@
{
SendMessageW(hBox, CB_INSERTSTRING, 1, (LPARAM)wstr);
if(lpDlgInfo->lpCC->dcb.fRtsControl ==
RTS_CONTROL_HANDSHAKE
- || lpDlgInfo->lpCC->dcb.fOutxCtsFlow == TRUE)
+ || lpDlgInfo->lpCC->dcb.fOutxCtsFlow)
{
SendMessageW(hBox, CB_SETCURSEL, 1, 0);
lpDlgInfo->InitialFlowIndex = 1;
Index: dll/win32/shimgvw/shimgvw.c
===================================================================
--- dll/win32/shimgvw/shimgvw.c (revision 65379)
+++ dll/win32/shimgvw/shimgvw.c (working copy)
@@ -123,7 +123,7 @@
c++;
sizeRemain -= sizeof(*c);
- if (IsEqualGUID(&rawFormat, &codecInfo[j].FormatID) == TRUE)
+ if (IsEqualGUID(&rawFormat, &codecInfo[j].FormatID))
{
sfn.nFilterIndex = j + 1;
}
Index: dll/win32/shlwapi/path.c
===================================================================
--- dll/win32/shlwapi/path.c (revision 65379)
+++ dll/win32/shlwapi/path.c (working copy)
@@ -1636,7 +1636,7 @@
* Although this function is prototyped as returning a BOOL, it returns
* FILE_ATTRIBUTE_DIRECTORY for success. This means that code such as:
*
- *| if (PathIsDirectoryA("c:\\windows\\") == TRUE)
+ *| if (PathIsDirectoryA("c:\\windows\\"))
*| ...
*
* will always fail.
Index: dll/win32/userenv/setup.c
===================================================================
--- dll/win32/userenv/setup.c (revision 65379)
+++ dll/win32/userenv/setup.c (working copy)
@@ -269,7 +269,7 @@
}
}
- if (lpFolderData->bHidden == TRUE)
+ if (lpFolderData->bHidden)
{
SetFileAttributesW(szBuffer,
FILE_ATTRIBUTE_HIDDEN);
Index: dll/win32/uxtheme/system.c
===================================================================
--- dll/win32/uxtheme/system.c (revision 65379)
+++ dll/win32/uxtheme/system.c (working copy)
@@ -189,7 +189,7 @@
WCHAR szCurrentSize[64];
BOOL bThemeActive = FALSE;
- if(bLoad == TRUE)
+ if(bLoad)
{
/* Get current theme configuration */
if(!RegOpenKeyW(HKEY_CURRENT_USER, szThemeManager, &hKey)) {
Index: dll/win32/uxtheme/themehooks.c
===================================================================
--- dll/win32/uxtheme/themehooks.c (revision 65379)
+++ dll/win32/uxtheme/themehooks.c (working copy)
@@ -151,11 +151,11 @@
return 0;
/* We don't touch the shape of the window if the application sets
it on its own */
- if (pcontext->HasAppDefinedRgn == TRUE)
+ if (pcontext->HasAppDefinedRgn)
return 0;
/* Calling SetWindowRgn will call SetWindowPos again so we need to
avoid this recursion */
- if (pcontext->UpdatingRgn == TRUE)
+ if (pcontext->UpdatingRgn)
return 0;
if(!IsAppThemed())
Index: dll/win32/vbscript/regexp.c
===================================================================
--- dll/win32/vbscript/regexp.c (revision 65379)
+++ dll/win32/vbscript/regexp.c (working copy)
@@ -2119,7 +2119,7 @@
assert(charSet->sense == FALSE);
++src;
} else {
- assert(charSet->sense == TRUE);
+ assert(charSet->sense != FALSE);
}
while (src != end) {
Index: dll/win32/wshtcpip/wshtcpip.c
===================================================================
--- dll/win32/wshtcpip/wshtcpip.c (revision 65379)
+++ dll/win32/wshtcpip/wshtcpip.c (working copy)
@@ -405,7 +405,7 @@
closeTcpFile(TcpCC);
- DPRINT("DeviceIoControl: %d\n", ((Status == TRUE) ? 0 :
GetLastError()));
+ DPRINT("DeviceIoControl: %d\n", ((Status) ? 0 : GetLastError()));
if (!Status)
return WSAEINVAL;
Index: drivers/bus/acpi/pnp.c
===================================================================
--- drivers/bus/acpi/pnp.c (revision 65379)
+++ drivers/bus/acpi/pnp.c (working copy)
@@ -375,7 +375,7 @@
// set the event because we won't be waiting on it.
// This optimization avoids grabbing the dispatcher lock and
improves perf.
//
- if (Irp->PendingReturned == TRUE) {
+ if (Irp->PendingReturned) {
KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE);
}
Index: drivers/bus/pcix/enum.c
===================================================================
--- drivers/bus/pcix/enum.c (revision 65379)
+++ drivers/bus/pcix/enum.c (working copy)
@@ -161,7 +161,7 @@
/* Shouldn't be a base resource, this is a
drain */
ASSERT(BaseResource == NULL);
DrainPartial =
Partial->u.DevicePrivate.Data[1];
- ASSERT(DrainPartial == TRUE);
+ ASSERT(DrainPartial != FALSE);
break;
}
break;
Index: drivers/filesystems/cdfs/dirctl.c
===================================================================
--- drivers/filesystems/cdfs/dirctl.c (revision 65379)
+++ drivers/filesystems/cdfs/dirctl.c (working copy)
@@ -203,7 +203,7 @@
IsRoot = TRUE;
}
- if (IsRoot == TRUE)
+ if (IsRoot)
{
StreamOffset.QuadPart = (LONGLONG)DeviceExt->CdInfo.RootStart
* (LONGLONG)BLOCKSIZE;
DirSize = DeviceExt->CdInfo.RootSize;
Index: drivers/filesystems/ext2/src/write.c
===================================================================
--- drivers/filesystems/ext2/src/write.c (revision 65379)
+++ drivers/filesystems/ext2/src/write.c (working copy)
@@ -638,7 +638,7 @@
// Zero the blocks out...
// This routine can be used even if caching
has not been initiated...
//
- if( ZeroOut == TRUE &&
StartOffsetForZeroing.QuadPart != EndOffsetForZeroing.QuadPart )
+ if( ZeroOut && StartOffsetForZeroing.QuadPart
!= EndOffsetForZeroing.QuadPart )
{
CcZeroData( PtrFileObject,
&StartOffsetForZeroing,
Index: drivers/filters/mountmgr/notify.c
===================================================================
--- drivers/filters/mountmgr/notify.c (revision 65379)
+++ drivers/filters/mountmgr/notify.c (working copy)
@@ -251,7 +251,7 @@
{
if (InterlockedCompareExchange(&(DeviceInformation->MountState),
FALSE,
- TRUE) == TRUE)
+ TRUE))
{
InterlockedDecrement(&(DeviceInformation->MountState));
}
Index: drivers/hid/hidclass/hidclass.c
===================================================================
--- drivers/hid/hidclass/hidclass.c (revision 65379)
+++ drivers/hid/hidclass/hidclass.c (working copy)
@@ -1039,7 +1039,7 @@
//
// FIXME: support PDO
//
- ASSERT(CommonDeviceExtension->IsFDO == TRUE);
+ ASSERT(CommonDeviceExtension->IsFDO != FALSE);
//
// skip current irp stack location
Index: drivers/ksfilter/ks/misc.c
===================================================================
--- drivers/ksfilter/ks/misc.c (revision 65379)
+++ drivers/ksfilter/ks/misc.c (working copy)
@@ -51,7 +51,7 @@
IN PIRP Irp,
IN PVOID Context)
{
- if (Irp->PendingReturned == TRUE)
+ if (Irp->PendingReturned)
{
KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE);
}
Index: drivers/multimedia/audio/mpu401_nt4/mpu401.c
===================================================================
--- drivers/multimedia/audio/mpu401_nt4/mpu401.c (revision 65379)
+++ drivers/multimedia/audio/mpu401_nt4/mpu401.c (working copy)
@@ -328,7 +328,7 @@
}
else if (BeepParam->Duration == (DWORD)-1)
{
- if (DeviceExtension->BeepOn == TRUE)
+ if (DeviceExtension->BeepOn)
{
HalMakeBeep(0);
DeviceExtension->BeepOn = FALSE;
Index: drivers/multimedia/audio/sndblst.old/sndblst.c
===================================================================
--- drivers/multimedia/audio/sndblst.old/sndblst.c (revision 65379)
+++ drivers/multimedia/audio/sndblst.old/sndblst.c (working copy)
@@ -387,7 +387,7 @@
}
else if (BeepParam->Duration == (DWORD)-1)
{
- if (DeviceExtension->BeepOn == TRUE)
+ if (DeviceExtension->BeepOn)
{
HalMakeBeep(0);
DeviceExtension->BeepOn = FALSE;
Index: drivers/storage/class/disk_new/disk.c
===================================================================
--- drivers/storage/class/disk_new/disk.c (revision 65379)
+++ drivers/storage/class/disk_new/disk.c (working copy)
@@ -720,7 +720,7 @@
ASSERT( status != STATUS_INSUFFICIENT_RESOURCES );
- } else if((commonExtension->IsFdo == TRUE) && (residualBytes ==
0)) {
+ } else if((commonExtension->IsFdo) && (residualBytes == 0)) {
//
// This failed because we think the physical disk is too
small.
@@ -3641,7 +3641,7 @@
status = DiskGetCacheInformation(fdoExtension, &cacheInfo);
- if (NT_SUCCESS(status) && (cacheInfo.WriteCacheEnabled == TRUE)) {
+ if (NT_SUCCESS(status) && (cacheInfo.WriteCacheEnabled)) {
cacheInfo.WriteCacheEnabled = FALSE;
@@ -4797,7 +4797,7 @@
//
// Determine the search direction and setup the loop
//
- if(SearchTopToBottom == TRUE) {
+ if(SearchTopToBottom) {
startIndex = 0;
stopIndex = LayoutInfo->PartitionCount;
Index: drivers/storage/class/disk_new/part.c
===================================================================
--- drivers/storage/class/disk_new/part.c (revision 65379)
+++ drivers/storage/class/disk_new/part.c (working copy)
@@ -93,7 +93,7 @@
// If the cached partition table is present then return a copy of it.
//
- if(diskData->CachedPartitionTableValid == TRUE) {
+ if(diskData->CachedPartitionTableValid) {
ULONG partitionNumber;
PDRIVE_LAYOUT_INFORMATION_EX layout =
diskData->CachedPartitionTable;
Index: drivers/storage/class/disk_new/pnp.c
===================================================================
--- drivers/storage/class/disk_new/pnp.c (revision 65379)
+++ drivers/storage/class/disk_new/pnp.c (working copy)
@@ -1314,7 +1314,7 @@
if (NT_SUCCESS(status))
{
- if (cacheInfo.WriteCacheEnabled == TRUE)
+ if (cacheInfo.WriteCacheEnabled)
{
if (writeCacheOverride == DiskWriteCacheDisable)
{
Index: drivers/storage/classpnp/autorun.c
===================================================================
--- drivers/storage/classpnp/autorun.c (revision 65379)
+++ drivers/storage/classpnp/autorun.c (working copy)
@@ -750,7 +750,7 @@
Executive,
KernelMode,
FALSE,
- ((Wait == TRUE) ? NULL : &zero));
+ ((Wait) ? NULL : &zero));
if(status == STATUS_TIMEOUT) {
@@ -1757,7 +1757,7 @@
adapterDescriptor = FdoExtension->AdapterDescriptor;
atapiResets = 0;
retryImmediately = TRUE;
- for (i = 0; i < 16 && retryImmediately == TRUE; i++) {
+ for (i = 0; i < 16 && retryImmediately; i++) {
irp = ClasspPrepareMcnIrp(FdoExtension, Info, TRUE);
if (irp == NULL) {
Index: drivers/storage/classpnp/class.c
===================================================================
--- drivers/storage/classpnp/class.c (revision 65379)
+++ drivers/storage/classpnp/class.c (working copy)
@@ -317,7 +317,7 @@
DriverObject->DriverStartIo = ClasspStartIo;
}
- if ((InitializationData->ClassUnload) && (ClassPnpAllowUnload ==
TRUE)) {
+ if ((InitializationData->ClassUnload) && (ClassPnpAllowUnload)) {
DriverObject->DriverUnload = ClassUnload;
} else {
DriverObject->DriverUnload = NULL;
@@ -1061,7 +1061,7 @@
// cleanup the changes done above
//
- if (setPagable == TRUE) {
+ if (setPagable) {
DebugPrint((2, "ClassDispatchPnp
(%p,%p): Unsetting "
"PAGABLE bit due to irp
failure\n",
DeviceObject, Irp));
Index: drivers/storage/classpnp/obsolete.c
===================================================================
--- drivers/storage/classpnp/obsolete.c (revision 65379)
+++ drivers/storage/classpnp/obsolete.c (working copy)
@@ -813,7 +813,7 @@
// current position then insert this entry into the current sweep.
//
- if((LowPriority != TRUE) && (BlockNumber > List->BlockNumber)) {
+ if( (!LowPriority) && (BlockNumber > List->BlockNumber) ) {
ClasspInsertCScanList(&(List->CurrentSweep), entry);
} else {
ClasspInsertCScanList(&(List->NextSweep), entry);
@@ -972,7 +972,7 @@
VOID NTAPI ClasspStartNextSweep(PCSCAN_LIST List)
{
- ASSERT(IsListEmpty(&(List->CurrentSweep)) == TRUE);
+ ASSERT(IsListEmpty(&(List->CurrentSweep)) != FALSE);
//
// If the next sweep is empty then there's nothing to do.
Index: drivers/storage/classpnp/power.c
===================================================================
--- drivers/storage/classpnp/power.c (revision 65379)
+++ drivers/storage/classpnp/power.c (working copy)
@@ -189,7 +189,7 @@
// request unless we can ignore failed locks
//
- if((context->Options.LockQueue == TRUE) &&
+ if((context->Options.LockQueue) &&
(!NT_SUCCESS(Irp->IoStatus.Status))) {
DebugPrint((1, "(%p)\tIrp status was %lx\n",
@@ -359,7 +359,7 @@
&status,
&context->RetryInterval);
- if((retry == TRUE) && (context->RetryCount-- != 0)) {
+ if((retry) && (context->RetryCount-- != 0)) {
DebugPrint((1, "(%p)\tRetrying failed request\n",
Irp));
@@ -537,7 +537,7 @@
ASSERT(!TEST_FLAG(context->Srb.SrbFlags,
SRB_FLAGS_FREE_SENSE_BUFFER));
ASSERT(!TEST_FLAG(context->Srb.SrbFlags,
SRB_FLAGS_PORT_DRIVER_ALLOCSENSE));
- ASSERT(context->Options.PowerDown == TRUE);
+ ASSERT(context->Options.PowerDown != FALSE);
ASSERT(context->Options.HandleSpinDown);
if(Irp->PendingReturned) {
@@ -554,7 +554,7 @@
DebugPrint((1, "(%p)\tPreviously sent power lock\n", Irp));
- if((context->Options.LockQueue == TRUE) &&
+ if((context->Options.LockQueue) &&
(!NT_SUCCESS(Irp->IoStatus.Status))) {
DebugPrint((1, "(%p)\tIrp status was %lx\n",
@@ -703,7 +703,7 @@
&status,
&context->RetryInterval);
- if((retry == TRUE) && (context->RetryCount-- != 0)) {
+ if((retry) && (context->RetryCount-- != 0)) {
DebugPrint((1, "(%p)\tRetrying failed
request\n", Irp));
@@ -808,7 +808,7 @@
&status,
&context->RetryInterval);
- if((retry == TRUE) && (context->RetryCount-- != 0)) {
+ if((retry) && (context->RetryCount-- != 0)) {
DebugPrint((1, "(%p)\tRetrying failed
request\n", Irp));
Index: drivers/storage/ide/atapi/atapi.c
===================================================================
--- drivers/storage/ide/atapi/atapi.c (revision 65379)
+++ drivers/storage/ide/atapi/atapi.c (working copy)
@@ -2824,7 +2824,7 @@
}
}
- if (*Again == TRUE) {
+ if (*Again) {
for (channel = 0; channel < 2; channel++) {
@@ -5677,7 +5677,7 @@
UCHAR statusByte,errorByte;
- if (EnableMSN == TRUE){
+ if (EnableMSN){
//
// If supported enable Media Status Notification support
@@ -5712,7 +5712,7 @@
}
}
- } else { // end if EnableMSN == TRUE
+ } else { // end if EnableMSN
//
// disable if previously enabled
Index: drivers/storage/ide/uniata/id_ata.cpp
===================================================================
--- drivers/storage/ide/uniata/id_ata.cpp (revision 65379)
+++ drivers/storage/ide/uniata/id_ata.cpp (working copy)
@@ -8186,7 +8186,7 @@
statusByte = WaitOnBaseBusy(chan);
//SelectDrive(chan, DeviceNumber);
- if (cdb->MEDIA_REMOVAL.Prevent == TRUE) {
+ if (cdb->MEDIA_REMOVAL.Prevent) {
//AtapiWritePort1(chan,
IDX_IO1_o_Command,IDE_COMMAND_DOOR_LOCK);
statusByte = AtaCommand(deviceExtension, DeviceNumber,
lChannel, IDE_COMMAND_DOOR_LOCK, 0, 0, 0, 0, 0, ATA_IMMEDIATE);
} else {
@@ -8473,7 +8473,7 @@
chan = &(deviceExtension->chan[lChannel]);
SelectDrive(chan, DeviceNumber);
- if (EnableMSN == TRUE){
+ if (EnableMSN){
// If supported enable Media Status Notification support
if ((chan->lun[DeviceNumber]->DeviceFlags &
DFLAGS_REMOVABLE_DRIVE)) {
@@ -8499,7 +8499,7 @@
}
}
- } else { // end if EnableMSN == TRUE
+ } else { // end if EnableMSN
// disable if previously enabled
if ((chan->lun[DeviceNumber]->DeviceFlags &
DFLAGS_MEDIA_STATUS_ENABLED)) {
Index: drivers/usb/usbehci/hardware.cpp
===================================================================
--- drivers/usb/usbehci/hardware.cpp (revision 65379)
+++ drivers/usb/usbehci/hardware.cpp (working copy)
@@ -1363,7 +1363,7 @@
//
// controller has acknowledged, assert we rang the bell
//
- PC_ASSERT(This->m_DoorBellRingInProgress == TRUE);
+ PC_ASSERT(This->m_DoorBellRingInProgress != FALSE);
//
// now notify IUSBQueue that it can free completed requests
Index: drivers/usb/usbehci/usb_queue.cpp
===================================================================
--- drivers/usb/usbehci/usb_queue.cpp (revision 65379)
+++ drivers/usb/usbehci/usb_queue.cpp (working copy)
@@ -499,7 +499,7 @@
//
// head queue head must be halted
//
- //PC_ASSERT(HeadQueueHead->Token.Bits.Halted == TRUE);
+ //PC_ASSERT(HeadQueueHead->Token.Bits.Halted != FALSE);
}
//
Index: drivers/usb/usbohci/usb_request.cpp
===================================================================
--- drivers/usb/usbohci/usb_request.cpp (revision 65379)
+++ drivers/usb/usbohci/usb_request.cpp (working copy)
@@ -1485,7 +1485,7 @@
//
// setup pid direction
//
- DataDescriptor->Flags |= InternalGetPidDirection() == TRUE ?
OHCI_TD_DIRECTION_PID_IN : OHCI_TD_DIRECTION_PID_OUT;
+ DataDescriptor->Flags |= InternalGetPidDirection() ?
OHCI_TD_DIRECTION_PID_IN : OHCI_TD_DIRECTION_PID_OUT;
//
// use short packets
@@ -1501,7 +1501,7 @@
//
// flip status pid direction
//
- StatusDescriptor->Flags |= InternalGetPidDirection() == TRUE ?
OHCI_TD_DIRECTION_PID_OUT : OHCI_TD_DIRECTION_PID_IN;
+ StatusDescriptor->Flags |= InternalGetPidDirection() ?
OHCI_TD_DIRECTION_PID_OUT : OHCI_TD_DIRECTION_PID_IN;
//
// link setup descriptor to data descriptor
Index: drivers/usb/usbstor/disk.c
===================================================================
--- drivers/usb/usbstor/disk.c (revision 65379)
+++ drivers/usb/usbstor/disk.c (working copy)
@@ -113,7 +113,7 @@
//
// sanity check
//
- ASSERT(PDODeviceExtension->Claimed == TRUE);
+ ASSERT(PDODeviceExtension->Claimed != FALSE);
//
// release claim
Index: drivers/wdm/audio/backpln/portcls/irp.cpp
===================================================================
--- drivers/wdm/audio/backpln/portcls/irp.cpp (revision 65379)
+++ drivers/wdm/audio/backpln/portcls/irp.cpp (working copy)
@@ -504,7 +504,7 @@
IN PIRP Irp,
IN PVOID Context)
{
- if (Irp->PendingReturned == TRUE)
+ if (Irp->PendingReturned)
{
KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE);
}
Index: drivers/wdm/audio/backpln/portcls/irpstream.cpp
===================================================================
--- drivers/wdm/audio/backpln/portcls/irpstream.cpp (revision 65379)
+++ drivers/wdm/audio/backpln/portcls/irpstream.cpp (working copy)
@@ -638,7 +638,7 @@
for(Index = 0; Index < StreamData->StreamHeaderIndex; Index++)
{
// check if it is the same tag
- if (StreamData->Tags[Index].Tag == Tag &&
StreamData->Tags[Index].Used == TRUE)
+ if (StreamData->Tags[Index].Tag == Tag &&
StreamData->Tags[Index].Used)
{
// mark mapping as released
StreamData->Tags[Index].Tag = NULL;
@@ -671,7 +671,7 @@
for(Index = 0; Index < StreamData->StreamHeaderCount; Index++)
{
if (StreamData->Tags[Index].Tag == Tag &&
- StreamData->Tags[Index].Used == TRUE)
+ StreamData->Tags[Index].Used)
{
// mark mapping as released
StreamData->Tags[Index].Tag = NULL;
Index: drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp
===================================================================
--- drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp (revision 65379)
+++ drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp (working copy)
@@ -646,7 +646,7 @@
// get event entry context
Context = (PLOOPEDSTREAMING_EVENT_CONTEXT)(EventEntry + 1);
- if (Context->bLoopedStreaming == TRUE)
+ if (Context->bLoopedStreaming)
{
if (NewOffset > OldOffset)
{
Index: drivers/wdm/audio/legacy/stream/helper.c
===================================================================
--- drivers/wdm/audio/legacy/stream/helper.c (revision 65379)
+++ drivers/wdm/audio/legacy/stream/helper.c (working copy)
@@ -16,7 +16,7 @@
IN PIRP Irp,
IN PVOID Context)
{
- if (Irp->PendingReturned == TRUE)
+ if (Irp->PendingReturned)
{
KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE);
}
Index: hal/halppc/generic/bus.c
===================================================================
--- hal/halppc/generic/bus.c (revision 65379)
+++ hal/halppc/generic/bus.c (working copy)
@@ -105,7 +105,7 @@
if (!Context) return FALSE;
/* If we have data in the context, then this shouldn't be a new
lookup */
- if ((*Context) && (NextBus == TRUE)) return FALSE;
+ if ((*Context) && (NextBus)) return FALSE;
/* Return bus data */
TranslatedAddress->QuadPart = BusAddress.QuadPart;
Index: hal/halppc/generic/display.c
===================================================================
--- hal/halppc/generic/display.c (revision 65379)
+++ hal/halppc/generic/display.c (working copy)
@@ -257,7 +257,7 @@
if (HalResetDisplayParameters == NULL)
return;
- if (HalOwnsDisplay == TRUE)
+ if (HalOwnsDisplay)
return;
HalOwnsDisplay = TRUE;
Index: hal/halx86/acpi/busemul.c
===================================================================
--- hal/halx86/acpi/busemul.c (revision 65379)
+++ hal/halx86/acpi/busemul.c (working copy)
@@ -105,7 +105,7 @@
if (!Context) return FALSE;
/* If we have data in the context, then this shouldn't be a new
lookup */
- if ((*Context) && (NextBus == TRUE)) return FALSE;
+ if ((*Context) && (NextBus)) return FALSE;
/* Return bus data */
TranslatedAddress->QuadPart = BusAddress.QuadPart;
Index: hal/halx86/legacy/bussupp.c
===================================================================
--- hal/halx86/legacy/bussupp.c (revision 65379)
+++ hal/halx86/legacy/bussupp.c (working copy)
@@ -1192,7 +1192,7 @@
/* Make sure we have a context */
if (!Context) return FALSE;
- ASSERT((*Context) || (NextBus == TRUE));
+ ASSERT((*Context) || (NextBus));
/* Read the context */
ContextValue = *Context;
Index: lib/3rdparty/freetype/src/sfnt/sfobjs.c
===================================================================
--- lib/3rdparty/freetype/src/sfnt/sfobjs.c (revision 65379)
+++ lib/3rdparty/freetype/src/sfnt/sfobjs.c (working copy)
@@ -1214,7 +1214,7 @@
face->sbit_table_type == TT_SBIT_TABLE_TYPE_SBIX )
flags |= FT_FACE_FLAG_COLOR; /* color glyphs */
- if ( has_outline == TRUE )
+ if ( has_outline )
flags |= FT_FACE_FLAG_SCALABLE; /* scalable outlines */
/* The sfnt driver only supports bitmap fonts natively, thus we */
@@ -1257,7 +1257,7 @@
/* */
flags = 0;
- if ( has_outline == TRUE && face->os2.version != 0xFFFFU )
+ if ( has_outline && face->os2.version != 0xFFFFU )
{
/* We have an OS/2 table; use the `fsSelection' field. Bit 9 */
/* indicates an oblique font face. This flag has been */
Index: lib/cmlib/cmtools.c
===================================================================
--- lib/cmlib/cmtools.c (revision 65379)
+++ lib/cmlib/cmtools.c (working copy)
@@ -44,7 +44,7 @@
{
ULONG i;
- if (NamePacked == TRUE)
+ if (NamePacked)
{
PUCHAR PackedName = (PUCHAR)Name;
@@ -153,7 +153,7 @@
ASSERT(Name != 0);
ASSERT(NameLength != 0);
- if (NamePacked == TRUE)
+ if (NamePacked)
{
NameLength *= sizeof(WCHAR);
CharCount = min(BufferLength, NameLength) / sizeof(WCHAR);
Index: lib/drivers/hidparser/api.c
===================================================================
--- lib/drivers/hidparser/api.c (revision 65379)
+++ lib/drivers/hidparser/api.c (working copy)
@@ -184,7 +184,7 @@
//
// check item type
//
- if (Report->Items[Index].HasData && bData == TRUE)
+ if (Report->Items[Index].HasData && bData)
{
//
// found data item
Index: lib/drivers/hidparser/hidparser.c
===================================================================
--- lib/drivers/hidparser/hidparser.c (revision 65379)
+++ lib/drivers/hidparser/hidparser.c (working copy)
@@ -139,9 +139,9 @@
DeviceDescription->ReportIDs[Index].FeatureLength =
HidParser_GetReportLength((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData,
HID_REPORT_TYPE_FEATURE);
- DeviceDescription->ReportIDs[Index].InputLength +=
(HidParser_UsesReportId((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData,
HID_REPORT_TYPE_INPUT) == TRUE ? 1 : 0);
- DeviceDescription->ReportIDs[Index].OutputLength +=
(HidParser_UsesReportId((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData,
HID_REPORT_TYPE_OUTPUT) == TRUE ? 1 : 0);
- DeviceDescription->ReportIDs[Index].FeatureLength +=
(HidParser_UsesReportId((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData,
HID_REPORT_TYPE_FEATURE) == TRUE ? 1 : 0);
+ DeviceDescription->ReportIDs[Index].InputLength +=
(HidParser_UsesReportId((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData,
HID_REPORT_TYPE_INPUT) ? 1 : 0);
+ DeviceDescription->ReportIDs[Index].OutputLength +=
(HidParser_UsesReportId((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData,
HID_REPORT_TYPE_OUTPUT) ? 1 : 0);
+ DeviceDescription->ReportIDs[Index].FeatureLength +=
(HidParser_UsesReportId((PVOID)DeviceDescription->CollectionDesc[Index].PreparsedData,
HID_REPORT_TYPE_FEATURE) ? 1 : 0);
//
Index: lib/drivers/hidparser/parser.c
===================================================================
--- lib/drivers/hidparser/parser.c (revision 65379)
+++ lib/drivers/hidparser/parser.c (working copy)
@@ -570,7 +570,7 @@
ReportItem->BitCount = GlobalItemState->ReportSize;
ReportItem->HasData = (ItemData->DataConstant == FALSE);
ReportItem->Array = (ItemData->ArrayVariable == 0);
- ReportItem->Relative = (ItemData->Relative == TRUE);
+ ReportItem->Relative = (ItemData->Relative);
ReportItem->Minimum = LogicalMinimum;
ReportItem->Maximum = LogicalMaximum;
ReportItem->UsageMinimum = UsageMinimum;
Index: lib/drivers/ip/network/routines.c
===================================================================
--- lib/drivers/ip/network/routines.c (revision 65379)
+++ lib/drivers/ip/network/routines.c (working copy)
@@ -63,8 +63,8 @@
UINT Length;
PCHAR CharBuffer;
- if ((DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_PBUFFER |
DPFLTR_MASK) != TRUE) ||
- (DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_IP |
DPFLTR_MASK) != TRUE)) {
+ if (( !DbgQueryDebugFilterState( DPFLTR_TCPIP_ID, DEBUG_PBUFFER |
DPFLTR_MASK )) ||
+ ( !DbgQueryDebugFilterState( DPFLTR_TCPIP_ID, DEBUG_IP |
DPFLTR_MASK ))) {
return;
}
Index: lib/drivers/sound/mmebuddy/mmewrap.c
===================================================================
--- lib/drivers/sound/mmebuddy/mmewrap.c (revision 65379)
+++ lib/drivers/sound/mmebuddy/mmewrap.c (working copy)
@@ -57,7 +57,7 @@
/* Store audio stream pause state */
SoundDeviceInstance->bPaused = !bStart;
- if (SoundDeviceInstance->bPaused == FALSE && OldState == TRUE)
+ if (SoundDeviceInstance->bPaused == FALSE && OldState)
{
InitiateSoundStreaming(SoundDeviceInstance);
}
Index: lib/drivers/sound/mmixer/controls.c
===================================================================
--- lib/drivers/sound/mmixer/controls.c (revision 65379)
+++ lib/drivers/sound/mmixer/controls.c (working copy)
@@ -1586,7 +1586,7 @@
MMixerIsTopologyPinReserved(Topology, Index, &Reserved);
/* check if it has already been reserved */
- if (Reserved == TRUE)
+ if (Reserved)
{
/* pin has already been reserved */
continue;
Index: lib/drivers/sound/mmixer/sup.c
===================================================================
--- lib/drivers/sound/mmixer/sup.c (revision 65379)
+++ lib/drivers/sound/mmixer/sup.c (working copy)
@@ -465,7 +465,7 @@
else if ((Flags & (MIXER_SETCONTROLDETAILSF_VALUE |
MIXER_SETCONTROLDETAILSF_CUSTOM)) == MIXER_SETCONTROLDETAILSF_VALUE)
{
/* sanity check */
- ASSERT(bSet == TRUE);
+ ASSERT(bSet != FALSE);
ASSERT(MixerControlDetails->cbDetails ==
sizeof(MIXERCONTROLDETAILS_BOOLEAN));
Values =
(LPMIXERCONTROLDETAILS_BOOLEAN)MixerControlDetails->paDetails;
Index: lib/rtl/debug.c
===================================================================
--- lib/rtl/debug.c (revision 65379)
+++ lib/rtl/debug.c (working copy)
@@ -64,7 +64,7 @@
/* Check if we should print it or not */
if ((ComponentId != MAXULONG) &&
- (NtQueryDebugFilterState(ComponentId, Level)) != TRUE)
+ ! NtQueryDebugFilterState( ComponentId, Level ))
{
/* This message is masked */
return STATUS_SUCCESS;
Index: lib/rtl/env.c
===================================================================
--- lib/rtl/env.c (revision 65379)
+++ lib/rtl/env.c (working copy)
@@ -535,7 +535,7 @@
}
Value->Length = 0;
- if (SysEnvUsed == TRUE)
+ if (SysEnvUsed)
RtlAcquirePebLock();
wcs = Environment;
@@ -573,7 +573,7 @@
Status = STATUS_BUFFER_TOO_SMALL;
}
- if (SysEnvUsed == TRUE)
+ if (SysEnvUsed)
RtlReleasePebLock();
return(Status);
@@ -582,7 +582,7 @@
wcs++;
}
- if (SysEnvUsed == TRUE)
+ if (SysEnvUsed)
RtlReleasePebLock();
DPRINT("Return STATUS_VARIABLE_NOT_FOUND: %wZ\n", Name);
Index: lib/rtl/heappage.c
===================================================================
--- lib/rtl/heappage.c (revision 65379)
+++ lib/rtl/heappage.c (working copy)
@@ -452,7 +452,7 @@
&NewElement);
ASSERT(AddressUserData == &DphNode->pUserAllocation);
- ASSERT(NewElement == TRUE);
+ ASSERT(NewElement != FALSE);
/* Update heap counters */
DphRoot->nBusyAllocations++;
@@ -617,7 +617,7 @@
/* Delete it from busy nodes table */
ElementPresent =
RtlDeleteElementGenericTableAvl(&DphRoot->BusyNodesTable,
&Node->pUserAllocation);
- ASSERT(ElementPresent == TRUE);
+ ASSERT(ElementPresent != FALSE);
/* Update counters */
DphRoot->nBusyAllocations--;
Index: lib/rtl/resource.c
===================================================================
--- lib/rtl/resource.c (revision 65379)
+++ lib/rtl/resource.c (working copy)
@@ -105,7 +105,7 @@
goto done;
}
wait:
- if (Wait == TRUE)
+ if (Wait)
{
Resource->ExclusiveWaiters++;
@@ -120,10 +120,10 @@
}
else /* one or more shared locks are in progress */
{
- if (Wait == TRUE)
+ if (Wait)
goto wait;
}
- if (retVal == TRUE)
+ if (retVal)
Resource->OwningThread = NtCurrentTeb()->ClientId.UniqueThread;
done:
RtlLeaveCriticalSection(&Resource->Lock);
@@ -154,7 +154,7 @@
goto done;
}
- if (Wait == TRUE)
+ if (Wait)
{
Resource->SharedWaiters++;
RtlLeaveCriticalSection(&Resource->Lock);
Index: lib/rtl/time.c
===================================================================
--- lib/rtl/time.c (revision 65379)
+++ lib/rtl/time.c (working copy)
@@ -106,7 +106,7 @@
{
/* Compute the cutover time of the first day of the current
month */
AdjustedTimeFields.Year = CurrentTimeFields.Year;
- if (NextYearsCutover == TRUE)
+ if (NextYearsCutover)
AdjustedTimeFields.Year++;
AdjustedTimeFields.Month = CutoverTimeFields->Month;
@@ -146,8 +146,8 @@
if (!RtlTimeFieldsToTime(&AdjustedTimeFields, &CutoverSystemTime))
return FALSE;
- if (ThisYearsCutoverOnly == TRUE ||
- NextYearsCutover == TRUE ||
+ if (ThisYearsCutoverOnly ||
+ NextYearsCutover ||
CutoverSystemTime.QuadPart >= CurrentTime->QuadPart)
{
break;
Index: lib/rtl/unicode.c
===================================================================
--- lib/rtl/unicode.c (revision 65379)
+++ lib/rtl/unicode.c (working copy)
@@ -1809,7 +1809,7 @@
PAGED_CODE_RTL();
- if (AllocateDestinationString == TRUE)
+ if (AllocateDestinationString)
{
UniDest->MaximumLength = UniSource->Length;
UniDest->Buffer =
RtlpAllocateStringMemory(UniDest->MaximumLength, TAG_USTR);
@@ -2620,7 +2620,7 @@
ComputerNameOem.Length = (USHORT)ComputerNameOemNLength;
ComputerNameOem.MaximumLength =
(USHORT)(MAX_COMPUTERNAME_LENGTH + 1);
- if (RtlpDidUnicodeToOemWork(DnsHostName, &ComputerNameOem)
== TRUE)
+ if (RtlpDidUnicodeToOemWork(DnsHostName, &ComputerNameOem))
{
/* no unmapped character so convert it back to an
unicode string */
Status = RtlOemStringToUnicodeString(ComputerName,
Index: lib/sdk/crt/misc/lock.c
===================================================================
--- lib/sdk/crt/misc/lock.c (revision 65379)
+++ lib/sdk/crt/misc/lock.c (working copy)
@@ -83,7 +83,7 @@
/* Uninitialize the table */
for( i=0; i < _TOTAL_LOCKS; i++ )
{
- if( lock_table[ i ].bInit == TRUE )
+ if( lock_table[ i ].bInit )
{
msvcrt_uninitialize_mlock( i );
}
Index: ntoskrnl/cache/pinsup.c
===================================================================
--- ntoskrnl/cache/pinsup.c (revision 65379)
+++ ntoskrnl/cache/pinsup.c (working copy)
@@ -471,7 +471,7 @@
{
BOOLEAN Success = FALSE, FaultIn = FALSE;
/* Note: windows 2000 drivers treat this as a bool */
- //BOOLEAN Wait = (Flags & MAP_WAIT) || (Flags == TRUE);
+ //BOOLEAN Wait = (Flags & MAP_WAIT) || (Flags);
LARGE_INTEGER Target, EndInterval;
ULONG BcbHead, SectionSize, ViewSize;
PNOCC_BCB Bcb = NULL;
Index: ntoskrnl/cc/pin.c
===================================================================
--- ntoskrnl/cc/pin.c (revision 65379)
+++ ntoskrnl/cc/pin.c (working copy)
@@ -165,7 +165,7 @@
/*
* 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.
Index: ntoskrnl/config/cmalloc.c
===================================================================
--- ntoskrnl/config/cmalloc.c (revision 65379)
+++ ntoskrnl/config/cmalloc.c (working copy)
@@ -57,7 +57,7 @@
PAGED_CODE();
/* Sanity checks */
- ASSERT(IsListEmpty(&Kcb->KeyBodyListHead) == TRUE);
+ ASSERT(IsListEmpty(&Kcb->KeyBodyListHead) != FALSE);
for (i = 0; i < 4; i++) ASSERT(Kcb->KeyBodyArray[i] == NULL);
/* Check if it wasn't privately allocated */
Index: ntoskrnl/config/cmapi.c
===================================================================
--- ntoskrnl/config/cmapi.c (revision 65379)
+++ ntoskrnl/config/cmapi.c (working copy)
@@ -2188,7 +2188,7 @@
/* Count the current hash entry if it is in use */
SubKeys++;
}
- else if ((CachedKcb->RefCount == 0) &&
(RemoveEmptyCacheEntries == TRUE))
+ else if ((CachedKcb->RefCount == 0) &&
(RemoveEmptyCacheEntries))
{
/* Remove the current key from the delayed
close list */
CmpRemoveFromDelayedClose(CachedKcb);
Index: ntoskrnl/config/cmdelay.c
===================================================================
--- ntoskrnl/config/cmdelay.c (revision 65379)
+++ ntoskrnl/config/cmdelay.c (working copy)
@@ -356,8 +356,8 @@
PAGED_CODE();
/* Sanity check */
- ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(Kcb) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
/* Make sure it's valid */
if (Kcb->DelayedCloseIndex != CmpDelayedCloseSize) ASSERT(FALSE);
@@ -364,7 +364,7 @@
/* Sanity checks */
ASSERT(Kcb->RefCount == 0);
- ASSERT(IsListEmpty(&Kcb->KeyBodyListHead) == TRUE);
+ ASSERT(IsListEmpty(&Kcb->KeyBodyListHead) != FALSE);
for (i = 0; i < 4; i++) ASSERT(Kcb->KeyBodyArray[i] == NULL);
/* Allocate a delay item */
@@ -430,8 +430,8 @@
PAGED_CODE();
/* Sanity checks */
- ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(Kcb) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
if (Kcb->DelayedCloseIndex == CmpDelayedCloseSize) ASSERT(FALSE);
/* Get the entry and lock the table */
Index: ntoskrnl/config/cmkcbncb.c
===================================================================
--- ntoskrnl/config/cmkcbncb.c (revision 65379)
+++ ntoskrnl/config/cmkcbncb.c (working copy)
@@ -306,8 +306,8 @@
CmpRemoveKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb)
{
/* Make sure that the registry and KCB are utterly locked */
- ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(Kcb) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
/* Remove the key hash */
CmpRemoveKeyHash(&Kcb->KeyHash);
@@ -435,8 +435,8 @@
ULONG i;
/* Sanity check */
- ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(Kcb) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
/* Check if the value list is cached */
if (CMP_IS_CELL_CACHED(Kcb->ValueCache.ValueList))
@@ -482,8 +482,8 @@
PAGED_CODE();
/* Sanity checks */
- ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(Kcb) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
ASSERT(Kcb->RefCount == 0);
/* Cleanup the value cache */
@@ -522,8 +522,8 @@
PCM_KEY_NODE KeyNode;
/* Sanity check */
- ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(Kcb) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
/* Check if there's any cached subkey */
if (Kcb->ExtFlags & (CM_KCB_NO_SUBKEY | CM_KCB_SUBKEY_ONE |
CM_KCB_SUBKEY_HINT))
@@ -620,8 +620,8 @@
if ((InterlockedDecrement((PLONG)&Kcb->RefCount) & 0xFFFF) == 0)
{
/* Sanity check */
- ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(Kcb) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
/* Check if we should do a direct delete */
if (((CmpHoldLazyFlush) &&
@@ -1086,8 +1086,8 @@
}
/* Make sure we have the exclusive lock */
- ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
/* do the insert */
InsertTailList(&KeyBody->KeyControlBlock->KeyBodyListHead,
@@ -1132,8 +1132,8 @@
/* Lock the KCB */
if (!LockHeld) CmpAcquireKcbLockExclusive(KeyBody->KeyControlBlock);
- ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) == TRUE) ||
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) != FALSE) ||
+ (CmpTestRegistryLockExclusive() != FALSE));
/* Remove the entry */
RemoveEntryList(&KeyBody->KeyBodyList);
Index: ntoskrnl/config/cmsysini.c
===================================================================
--- ntoskrnl/config/cmsysini.c (revision 65379)
+++ ntoskrnl/config/cmsysini.c (working copy)
@@ -1412,8 +1412,8 @@
for (i = 0; i < CM_NUMBER_OF_MACHINE_HIVES; i++)
{
/* Make sure the thread ran and finished */
- ASSERT(CmpMachineHiveList[i].ThreadFinished == TRUE);
- ASSERT(CmpMachineHiveList[i].ThreadStarted == TRUE);
+ ASSERT(CmpMachineHiveList[i].ThreadFinished != FALSE);
+ ASSERT(CmpMachineHiveList[i].ThreadStarted != FALSE);
/* Check if this was a new hive */
if (!CmpMachineHiveList[i].CmHive)
Index: ntoskrnl/ex/hdlsterm.c
===================================================================
--- ntoskrnl/ex/hdlsterm.c (revision 65379)
+++ ntoskrnl/ex/hdlsterm.c (working copy)
@@ -47,7 +47,7 @@
}
else
{
- ASSERT(HeadlessGlobals->InBugCheck == TRUE);
+ ASSERT(HeadlessGlobals->InBugCheck != FALSE);
}
}
@@ -505,7 +505,7 @@
(Command != HeadlessCmdSendBlueScreenData) &&
(Command != HeadlessCmdDoBugCheckProcessing))
{
- ASSERT(HeadlessGlobals->ProcessingCmd == TRUE);
+ ASSERT(HeadlessGlobals->ProcessingCmd != FALSE);
HeadlessGlobals->ProcessingCmd = FALSE;
}
Index: ntoskrnl/fsrtl/fastio.c
===================================================================
--- ntoskrnl/fsrtl/fastio.c (revision 65379)
+++ ntoskrnl/fsrtl/fastio.c (working copy)
@@ -218,7 +218,7 @@
/* File was accessed */
FileObject->Flags |= FO_FILE_FAST_IO_READ;
- if (Result == TRUE)
+ if (Result)
{
ASSERT((IoStatus->Status == STATUS_END_OF_FILE) ||
(((ULONGLONG)FileOffset->QuadPart +
IoStatus->Information) <=
@@ -227,7 +227,7 @@
}
/* Update the current file offset */
- if (Result == TRUE)
+ if (Result)
{
FileObject->CurrentByteOffset.QuadPart =
FileOffset->QuadPart + IoStatus->Information;
}
@@ -343,7 +343,7 @@
* If we append, use the file size as offset.
* Also, check that we aren't crossing the 4GB boundary.
*/
- if (FileOffsetAppend == TRUE)
+ if (FileOffsetAppend)
{
Offset.LowPart = FcbHeader->FileSize.LowPart;
NewSize.LowPart = FcbHeader->FileSize.LowPart + Length;
@@ -381,7 +381,7 @@
/* Then we need to acquire the resource exclusive */
ExReleaseResourceLite(FcbHeader->Resource);
ExAcquireResourceExclusiveLite(FcbHeader->Resource, TRUE);
- if (FileOffsetAppend == TRUE)
+ if (FileOffsetAppend)
{
Offset.LowPart = FcbHeader->FileSize.LowPart; // ??
NewSize.LowPart = FcbHeader->FileSize.LowPart +
Length;
@@ -483,7 +483,7 @@
PsGetCurrentThread()->TopLevelIrp = 0;
/* Did the operation succeed? */
- if (Result == TRUE)
+ if (Result)
{
/* Update the valid file size if necessary */
if (NewSize.LowPart > FcbHeader->ValidDataLength.LowPart)
@@ -568,7 +568,7 @@
}
/* Check if we are appending */
- if (FileOffsetAppend == TRUE)
+ if (FileOffsetAppend)
{
Offset.QuadPart = FcbHeader->FileSize.QuadPart;
NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
@@ -1338,7 +1338,7 @@
}
/* Check if we are appending */
- if (FileOffsetAppend == TRUE)
+ if (FileOffsetAppend)
{
Offset.QuadPart = FcbHeader->FileSize.QuadPart;
NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
Index: ntoskrnl/fstub/disksup.c
===================================================================
--- ntoskrnl/fstub/disksup.c (revision 65379)
+++ ntoskrnl/fstub/disksup.c (working copy)
@@ -672,7 +672,7 @@
/* 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) &&
IsRecognizedPartition(LayoutArray[DiskNumber]->PartitionEntry[j].PartitionType))
{
if
(LayoutArray[DiskNumber]->PartitionEntry[j].RewritePartition == FALSE)
Index: ntoskrnl/include/internal/cm_x.h
===================================================================
--- ntoskrnl/include/internal/cm_x.h (revision 65379)
+++ ntoskrnl/include/internal/cm_x.h (working copy)
@@ -88,31 +88,31 @@
// Makes sure that the registry is locked
//
#define CMP_ASSERT_REGISTRY_LOCK() \
- ASSERT((CmpSpecialBootCondition == TRUE) || \
- (CmpTestRegistryLock() == TRUE))
+ ASSERT((CmpSpecialBootCondition != FALSE) || \
+ (CmpTestRegistryLock() != FALSE))
//
// Makes sure that the registry is locked or loading
//
#define CMP_ASSERT_REGISTRY_LOCK_OR_LOADING(h) \
- ASSERT((CmpSpecialBootCondition == TRUE) || \
- (((PCMHIVE)h)->HiveIsLoading == TRUE) || \
- (CmpTestRegistryLock() == TRUE))
+ ASSERT((CmpSpecialBootCondition != FALSE) || \
+ (((PCMHIVE)h)->HiveIsLoading != FALSE) || \
+ (CmpTestRegistryLock() != FALSE))
//
// Makes sure that the registry is exclusively locked
//
#define CMP_ASSERT_EXCLUSIVE_REGISTRY_LOCK() \
- ASSERT((CmpSpecialBootCondition == TRUE) || \
- (CmpTestRegistryLockExclusive() == TRUE))
+ ASSERT((CmpSpecialBootCondition != FALSE) || \
+ (CmpTestRegistryLockExclusive() != FALSE))
//
// Makes sure that the registry is exclusively locked or loading
//
#define CMP_ASSERT_EXCLUSIVE_REGISTRY_LOCK_OR_LOADING(h) \
- ASSERT((CmpSpecialBootCondition == TRUE) || \
- (((PCMHIVE)h)->HiveIsLoading == TRUE) || \
- (CmpTestRegistryLockExclusive() == TRUE))
+ ASSERT((CmpSpecialBootCondition != FALSE) || \
+ (((PCMHIVE)h)->HiveIsLoading != FALSE) || \
+ (CmpTestRegistryLockExclusive() != FALSE))
//
// Makes sure this is a valid KCB
@@ -278,7 +278,7 @@
{ \
ASSERT(((GET_HASH_ENTRY(CmpCacheTable, k).Owner == \
KeGetCurrentThread())) || \
- (CmpTestRegistryLockExclusive() == TRUE)); \
+ (CmpTestRegistryLockExclusive() != FALSE)); \
}
//
@@ -286,8 +286,8 @@
//
#define CMP_ASSERT_KCB_LOCK(k) \
{ \
- ASSERT((CmpIsKcbLockedExclusive(k) == TRUE) || \
- (CmpTestRegistryLockExclusive() == TRUE)); \
+ ASSERT((CmpIsKcbLockedExclusive(k) != FALSE) || \
+ (CmpTestRegistryLockExclusive() != FALSE)); \
}
//
@@ -306,11 +306,11 @@
// Makes sure that the registry is locked for flushes
//
#define CMP_ASSERT_FLUSH_LOCK(h) \
- ASSERT((CmpSpecialBootCondition == TRUE) || \
- (((PCMHIVE)h)->HiveIsLoading == TRUE) || \
- (CmpTestHiveFlusherLockShared((PCMHIVE)h) == TRUE) || \
- (CmpTestHiveFlusherLockExclusive((PCMHIVE)h) == TRUE) || \
- (CmpTestRegistryLockExclusive() == TRUE));
+ ASSERT((CmpSpecialBootCondition != FALSE) || \
+ (((PCMHIVE)h)->HiveIsLoading != FALSE) || \
+ (CmpTestHiveFlusherLockShared((PCMHIVE)h) != FALSE) || \
+ (CmpTestHiveFlusherLockExclusive((PCMHIVE)h) != FALSE) || \
+ (CmpTestRegistryLockExclusive() != FALSE));
//
// Asserts that either the registry or the KCB is locked
@@ -319,7 +319,7 @@
{ \
ASSERT(((GET_HASH_ENTRY(CmpCacheTable, k).Owner == \
KeGetCurrentThread())) || \
- (CmpTestRegistryLockExclusive() == TRUE)); \
+ (CmpTestRegistryLockExclusive() != FALSE)); \
}
//
Index: ntoskrnl/include/internal/ke_x.h
===================================================================
--- ntoskrnl/include/internal/ke_x.h (revision 65379)
+++ ntoskrnl/include/internal/ke_x.h (working copy)
@@ -514,7 +514,7 @@
Value = InterlockedExchange((PLONG)&Thread->ThreadLock, Value);
/* Return the lock state */
- return (Value == TRUE);
+ return (Value != FALSE);
}
FORCEINLINE
Index: ntoskrnl/io/iomgr/driver.c
===================================================================
--- ntoskrnl/io/iomgr/driver.c (revision 65379)
+++ ntoskrnl/io/iomgr/driver.c (working copy)
@@ -127,7 +127,7 @@
DriverName.Length = 0;
DriverName.MaximumLength = sizeof(NameBuffer);
- if (FileSystem == TRUE)
+ if (FileSystem)
RtlAppendUnicodeToString(&DriverName, FILESYSTEM_ROOT_NAME);
else
RtlAppendUnicodeToString(&DriverName, DRIVER_ROOT_NAME);
@@ -494,7 +494,7 @@
/* Create ModuleName string */
if (ServiceName && ServiceName->Length > 0)
{
- if (FileSystemDriver == TRUE)
+ if (FileSystemDriver)
wcscpy(NameBuffer, FILESYSTEM_ROOT_NAME);
else
wcscpy(NameBuffer, DRIVER_ROOT_NAME);
Index: ntoskrnl/io/iomgr/file.c
===================================================================
--- ntoskrnl/io/iomgr/file.c (revision 65379)
+++ ntoskrnl/io/iomgr/file.c (working copy)
@@ -2104,7 +2104,7 @@
}
/* Check if we were 100% successful */
- if ((OpenPacket->ParseCheck == TRUE) && (OpenPacket->FileObject))
+ if ((OpenPacket->ParseCheck) && (OpenPacket->FileObject))
{
/* Dereference the File Object */
ObDereferenceObject(OpenPacket->FileObject);
@@ -2375,7 +2375,7 @@
DesiredAccess,
&OpenPacket,
&Handle);
- if (OpenPacket.ParseCheck != TRUE)
+ if ( !OpenPacket.ParseCheck )
{
/* Parse failed */
IoStatus->Status = Status;
@@ -3188,7 +3188,7 @@
DELETE,
&OpenPacket,
&Handle);
- if (OpenPacket.ParseCheck != TRUE) return Status;
+ if ( !OpenPacket.ParseCheck ) return Status;
/* Retrn the Io status */
return OpenPacket.FinalStatus;
Index: ntoskrnl/kd64/kdapi.c
===================================================================
--- ntoskrnl/kd64/kdapi.c (revision 65379)
+++ ntoskrnl/kd64/kdapi.c (working copy)
@@ -721,7 +721,7 @@
ASSERT(Data->Length == sizeof(CONTEXT));
/* Make sure that this is a valid request */
- if ((State->Processor < KeNumberProcessors) && (KdpContextSent ==
TRUE))
+ if ((State->Processor < KeNumberProcessors) && (KdpContextSent))
{
/* Check if the request is for this CPU */
if (State->Processor == KeGetCurrentPrcb()->Number)
Index: ntoskrnl/ke/amd64/except.c
===================================================================
--- ntoskrnl/ke/amd64/except.c (revision 65379)
+++ ntoskrnl/ke/amd64/except.c (working copy)
@@ -277,7 +277,7 @@
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,
Index: ntoskrnl/ke/apc.c
===================================================================
--- ntoskrnl/ke/apc.c (revision 65379)
+++ ntoskrnl/ke/apc.c (working copy)
@@ -109,7 +109,7 @@
ApcMode = Apc->ApcMode;
/* The APC must be "inserted" already */
- ASSERT(Apc->Inserted == TRUE);
+ ASSERT(Apc->Inserted != FALSE);
/* Three scenarios:
* 1) Kernel APC with Normal Routine or User APC = Put it at the
end of the List
Index: ntoskrnl/ke/arm/exp.c
===================================================================
--- ntoskrnl/ke/arm/exp.c (revision 65379)
+++ ntoskrnl/ke/arm/exp.c (working copy)
@@ -218,7 +218,7 @@
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,
Index: ntoskrnl/ke/bug.c
===================================================================
--- ntoskrnl/ke/bug.c (revision 65379)
+++ ntoskrnl/ke/bug.c (working copy)
@@ -67,7 +67,7 @@
i++;
/* Check if this is a kernel entry and we only want drivers */
- if ((i <= 2) && (DriversOnly == TRUE))
+ if ((i <= 2) && (DriversOnly))
{
/* Skip it */
NextEntry = NextEntry->Flink;
Index: ntoskrnl/ke/i386/cpu.c
===================================================================
--- ntoskrnl/ke/i386/cpu.c (revision 65379)
+++ ntoskrnl/ke/i386/cpu.c (working copy)
@@ -1331,7 +1331,7 @@
}
/* Need FXSR support for this */
- ASSERT(KeI386FxsrPresent == TRUE);
+ ASSERT(KeI386FxsrPresent != FALSE);
/* Check for sane CR0 */
Cr0 = __readcr0();
Index: ntoskrnl/ke/i386/exp.c
===================================================================
--- ntoskrnl/ke/i386/exp.c (revision 65379)
+++ ntoskrnl/ke/i386/exp.c (working copy)
@@ -898,7 +898,7 @@
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,
Index: ntoskrnl/mm/ARM3/mdlsup.c
===================================================================
--- ntoskrnl/mm/ARM3/mdlsup.c (revision 65379)
+++ ntoskrnl/mm/ARM3/mdlsup.c (working copy)
@@ -258,7 +258,7 @@
Pfn1 = MiGetPfnEntry(*Pages);
ASSERT(Pfn1);
ASSERT(Pfn1->u2.ShareCount == 1);
- ASSERT(MI_IS_PFN_DELETED(Pfn1) == TRUE);
+ ASSERT(MI_IS_PFN_DELETED(Pfn1) != FALSE);
if (Pfn1->u4.PteFrame != 0x1FFEDCB)
{
/* Corrupted PFN entry or invalid free */
Index: ntoskrnl/mm/ARM3/miarm.h
===================================================================
--- ntoskrnl/mm/ARM3/miarm.h (revision 65379)
+++ ntoskrnl/mm/ARM3/miarm.h (working copy)
@@ -1123,7 +1123,7 @@
return FALSE;
}
-#define MI_IS_ROS_PFN(x) ((x)->u4.AweAllocation == TRUE)
+#define MI_IS_ROS_PFN(x) ((x)->u4.AweAllocation != FALSE)
VOID
NTAPI
@@ -1136,7 +1136,7 @@
BOOLEAN
MI_IS_WS_UNSAFE(IN PEPROCESS Process)
{
- return (Process->Vm.Flags.AcquiredUnsafe == TRUE);
+ return (Process->Vm.Flags.AcquiredUnsafe != FALSE);
}
//
@@ -1196,7 +1196,7 @@
ASSERT(Thread->OwnsProcessWorkingSetExclusive == FALSE);
/* APCs must be blocked, make sure that still nothing is already
held */
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
ASSERT(!MM_ANY_WS_LOCK_HELD(Thread));
/* Lock the working set */
@@ -1222,7 +1222,7 @@
ASSERT(!MI_IS_WS_UNSAFE(Process));
/* The thread doesn't own it anymore */
- ASSERT(Thread->OwnsProcessWorkingSetExclusive == TRUE);
+ ASSERT(Thread->OwnsProcessWorkingSetExclusive != FALSE);
Thread->OwnsProcessWorkingSetExclusive = FALSE;
/* Release the lock and re-enable APCs */
@@ -1243,7 +1243,7 @@
ASSERT(!MI_IS_WS_UNSAFE(Process));
/* Ensure we are in a shared acquisition */
- ASSERT(Thread->OwnsProcessWorkingSetShared == TRUE);
+ ASSERT(Thread->OwnsProcessWorkingSetShared != FALSE);
ASSERT(Thread->OwnsProcessWorkingSetExclusive == FALSE);
/* Don't claim the lock anylonger */
@@ -1264,7 +1264,7 @@
{
/* Make sure we are the owner of an unsafe acquisition */
ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
ASSERT(MI_WS_OWNER(Process));
ASSERT(MI_IS_WS_UNSAFE(Process));
@@ -1272,7 +1272,7 @@
Process->Vm.Flags.AcquiredUnsafe = 0;
/* The thread doesn't own it anymore */
- ASSERT(Thread->OwnsProcessWorkingSetExclusive == TRUE);
+ ASSERT(Thread->OwnsProcessWorkingSetExclusive != FALSE);
Thread->OwnsProcessWorkingSetExclusive = FALSE;
/* Release the lock but don't touch APC state */
@@ -1339,15 +1339,15 @@
if (WorkingSet == &MmSystemCacheWs)
{
/* Release the system working set */
- ASSERT((Thread->OwnsSystemWorkingSetExclusive == TRUE) ||
- (Thread->OwnsSystemWorkingSetShared == TRUE));
+ ASSERT((Thread->OwnsSystemWorkingSetExclusive != FALSE) ||
+ (Thread->OwnsSystemWorkingSetShared != FALSE));
Thread->OwnsSystemWorkingSetExclusive = FALSE;
}
else if (WorkingSet->Flags.SessionSpace)
{
/* Release the session working set */
- ASSERT((Thread->OwnsSessionWorkingSetExclusive == TRUE) ||
- (Thread->OwnsSessionWorkingSetShared == TRUE));
+ ASSERT((Thread->OwnsSessionWorkingSetExclusive != FALSE) ||
+ (Thread->OwnsSessionWorkingSetShared != FALSE));
Thread->OwnsSessionWorkingSetExclusive = 0;
}
else
Index: ntoskrnl/mm/ARM3/pagfault.c
===================================================================
--- ntoskrnl/mm/ARM3/pagfault.c (revision 65379)
+++ ntoskrnl/mm/ARM3/pagfault.c (working copy)
@@ -40,7 +40,7 @@
{
/* This isn't valid */
DPRINT1("Process owns address space lock\n");
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
return STATUS_GUARD_PAGE_VIOLATION;
}
@@ -1184,7 +1184,7 @@
//
OldIrql = KeGetCurrentIrql();
ASSERT(OldIrql <= APC_LEVEL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
//
// Grab a copy of the PTE
@@ -1230,7 +1230,7 @@
/* Complete this as a transition fault */
ASSERT(OldIrql == KeGetCurrentIrql());
ASSERT(OldIrql <= APC_LEVEL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
return Status;
}
else
@@ -1359,7 +1359,7 @@
/* Complete this as a transition fault */
ASSERT(OldIrql == KeGetCurrentIrql());
ASSERT(OldIrql <= APC_LEVEL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
return STATUS_PAGE_FAULT_TRANSITION;
}
@@ -1402,7 +1402,7 @@
/* Complete this as a transition fault */
ASSERT(OldIrql == KeGetCurrentIrql());
ASSERT(OldIrql <= APC_LEVEL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
return Status;
}
}
@@ -1430,7 +1430,7 @@
ASSERT(OldIrql == KeGetCurrentIrql());
ASSERT(OldIrql <= APC_LEVEL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
return Status;
}
@@ -1448,7 +1448,7 @@
ASSERT(OldIrql == KeGetCurrentIrql());
ASSERT(OldIrql <= APC_LEVEL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
return Status;
}
@@ -1471,7 +1471,7 @@
PointerPte,
Process,
MM_NOIRQL);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
if (NT_SUCCESS(Status))
{
//
@@ -1876,7 +1876,7 @@
NULL);
/* Release the working set */
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
MiUnlockWorkingSet(CurrentThread, WorkingSet);
KeLowerIrql(LockIrql);
@@ -1974,7 +1974,7 @@
UserPdeFault = FALSE;
#endif
/* We should come back with APCs enabled, and with a valid PDE */
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
ASSERT(PointerPde->u.Hard.Valid == 1);
}
else
Index: ntoskrnl/mm/ARM3/pfnlist.c
===================================================================
--- ntoskrnl/mm/ARM3/pfnlist.c (revision 65379)
+++ ntoskrnl/mm/ARM3/pfnlist.c (working copy)
@@ -1183,7 +1183,7 @@
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;
Index: ntoskrnl/mm/ARM3/pool.c
===================================================================
--- ntoskrnl/mm/ARM3/pool.c (revision 65379)
+++ ntoskrnl/mm/ARM3/pool.c (working copy)
@@ -1331,7 +1331,7 @@
PointerPde,
MmSessionSpace->SessionPageDirectoryIndex,
TRUE);
- ASSERT(NT_SUCCESS(Status) == TRUE);
+ ASSERT(NT_SUCCESS( Status ));
/* Initialize the first page table */
Index = (ULONG_PTR)MmSessionSpace->PagedPoolStart -
(ULONG_PTR)MmSessionBase;
Index: ntoskrnl/mm/ARM3/procsup.c
===================================================================
--- ntoskrnl/mm/ARM3/procsup.c (revision 65379)
+++ ntoskrnl/mm/ARM3/procsup.c (working copy)
@@ -156,8 +156,8 @@
/* Sanity checks for a valid TEB VAD */
ASSERT((Vad->StartingVpn == ((ULONG_PTR)Teb >> PAGE_SHIFT) &&
(Vad->EndingVpn == (TebEnd >> PAGE_SHIFT))));
- ASSERT(Vad->u.VadFlags.NoChange == TRUE);
- ASSERT(Vad->u2.VadFlags2.OneSecured == TRUE);
+ ASSERT(Vad->u.VadFlags.NoChange != FALSE);
+ ASSERT(Vad->u2.VadFlags2.OneSecured != FALSE);
ASSERT(Vad->u2.VadFlags2.MultipleSecured == FALSE);
/* Lock the working set */
Index: ntoskrnl/mm/ARM3/section.c
===================================================================
--- ntoskrnl/mm/ARM3/section.c (revision 65379)
+++ ntoskrnl/mm/ARM3/section.c (working copy)
@@ -1624,7 +1624,7 @@
/* Get the section object of this process*/
SectionObject = PsGetCurrentProcess()->SectionObject;
ASSERT(SectionObject != NULL);
- ASSERT(MiIsRosSectionObject(SectionObject) == TRUE);
+ ASSERT(MiIsRosSectionObject(SectionObject) != FALSE);
/* Return the image information */
*ImageInformation =
((PROS_SECTION_OBJECT)SectionObject)->ImageSection->ImageInformation;
@@ -2804,7 +2804,7 @@
}
/* Use the system space API, but with the session view instead */
- ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE);
+ ASSERT(MmIsAddressValid(MmSessionSpace) != FALSE);
return MiMapViewInSystemSpace(Section,
&MmSessionSpace->Session,
MappedBase,
@@ -2834,7 +2834,7 @@
}
/* Use the system space API, but with the session view instead */
- ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE);
+ ASSERT(MmIsAddressValid(MmSessionSpace) != FALSE);
return MiUnmapViewInSystemSpace(&MmSessionSpace->Session,
MappedBase);
}
@@ -2920,7 +2920,7 @@
EndingAddress = ((ULONG_PTR)MappedBase + ViewSize - 1) |
(PAGE_SIZE - 1);
/* Sanity check and grab the session */
- ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE);
+ ASSERT(MmIsAddressValid(MmSessionSpace) != FALSE);
Session = &MmSessionSpace->Session;
/* Get the hash entry for this allocation */
Index: ntoskrnl/mm/ARM3/session.c
===================================================================
--- ntoskrnl/mm/ARM3/session.c (revision 65379)
+++ ntoskrnl/mm/ARM3/session.c (working copy)
@@ -422,7 +422,7 @@
}
/* Sanity check */
- ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE);
+ ASSERT(MmIsAddressValid(MmSessionSpace) != FALSE);
/* Acquire the expansion lock while touching the session */
OldIrql = MiAcquireExpansionLock();
@@ -448,7 +448,7 @@
if (!(PsGetCurrentProcess()->Flags & PSF_PROCESS_IN_SESSION_BIT))
return;
/* Sanity check */
- ASSERT(MmIsAddressValid(MmSessionSpace) == TRUE);
+ ASSERT(MmIsAddressValid(MmSessionSpace) != FALSE);
/* Get the global session */
SessionGlobal = MmSessionSpace->GlobalVirtualAddress;
@@ -519,7 +519,7 @@
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
/* Check if we need a page table */
- if (AllocatedPageTable == TRUE)
+ if (AllocatedPageTable)
{
/* Get a zeroed colored zero page */
Color = MI_GET_NEXT_COLOR();
@@ -797,11 +797,11 @@
/* Initialize session pool */
//Status = MiInitializeSessionPool();
Status = STATUS_SUCCESS;
- ASSERT(NT_SUCCESS(Status) == TRUE);
+ ASSERT(NT_SUCCESS(Status) != FALSE);
/* Initialize system space */
Result = MiInitializeSystemSpaceMap(&SessionGlobal->Session);
- ASSERT(Result == TRUE);
+ ASSERT(Result != FALSE);
/* Initialize the process list, make sure the workign set list is
empty */
ASSERT(SessionGlobal->WsListEntry.Flink == NULL);
Index: ntoskrnl/mm/ARM3/virtual.c
===================================================================
--- ntoskrnl/mm/ARM3/virtual.c (revision 65379)
+++ ntoskrnl/mm/ARM3/virtual.c (working copy)
@@ -215,7 +215,7 @@
(PageTableVirtualAddress > MmPagedPoolEnd));
/* Working set lock or PFN lock should be held */
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
/* Check if the page table is valid */
while (!MmIsAddressValid(PageTableVirtualAddress))
@@ -2377,7 +2377,7 @@
// Sanity checks. The latter is because we only use this function
with the
// PFN lock not held, so it may go away in the future.
//
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
ASSERT(OldIrql == MM_NOIRQL);
//
@@ -2407,7 +2407,7 @@
//
// Make sure APCs continued to be disabled
//
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
//
// First, make the PXE valid if needed
Index: ntoskrnl/mm/freelist.c
===================================================================
--- ntoskrnl/mm/freelist.c (revision 65379)
+++ ntoskrnl/mm/freelist.c (working copy)
@@ -17,7 +17,7 @@
#define MODULE_INVOLVED_IN_ARM3
#include "ARM3/miarm.h"
-#define ASSERT_IS_ROS_PFN(x) ASSERT(MI_IS_ROS_PFN(x) == TRUE);
+#define ASSERT_IS_ROS_PFN(x) ASSERT(MI_IS_ROS_PFN(x) != FALSE);
/* GLOBALS
****************************************************************/
@@ -398,7 +398,7 @@
if (ListHead)
{
/* Should not be trying to insert an RMAP for a non-active page */
- ASSERT(MiIsPfnInUse(Pfn1) == TRUE);
+ ASSERT(MiIsPfnInUse(Pfn1) != FALSE);
/* Set the list head address */
Pfn1->RmapListHead = ListHead;
@@ -406,7 +406,7 @@
else
{
/* ReactOS semantics dictate the page is STILL active right now */
- ASSERT(MiIsPfnInUse(Pfn1) == TRUE);
+ ASSERT(MiIsPfnInUse(Pfn1) != FALSE);
/* In this case, the RMAP is actually being removed, so clear
field */
Pfn1->RmapListHead = NULL;
@@ -437,7 +437,7 @@
ListHead = Pfn1->RmapListHead;
/* Should not have an RMAP for a non-active page */
- ASSERT(MiIsPfnInUse(Pfn1) == TRUE);
+ ASSERT(MiIsPfnInUse(Pfn1) != FALSE);
/* Release PFN database and return rmap list head */
KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql);
Index: ntoskrnl/mm/i386/page.c
===================================================================
--- ntoskrnl/mm/i386/page.c (revision 65379)
+++ ntoskrnl/mm/i386/page.c (working copy)
@@ -289,7 +289,7 @@
NULL,
NULL);
DBG_UNREFERENCED_LOCAL_VARIABLE(Status);
- ASSERT(KeAreAllApcsDisabled() == TRUE);
+ ASSERT(KeAreAllApcsDisabled() != FALSE);
ASSERT(PointerPde->u.Hard.Valid == 1);
}
return (PULONG)MiAddressToPte(Address);
Index: ntoskrnl/ps/process.c
===================================================================
--- ntoskrnl/ps/process.c (revision 65379)
+++ ntoskrnl/ps/process.c (working copy)
@@ -767,7 +767,7 @@
if (!NT_SUCCESS(Status)) goto Cleanup;
/* Compute Quantum and Priority */
- ASSERT(IsListEmpty(&Process->ThreadListHead) == TRUE);
+ ASSERT(IsListEmpty(&Process->ThreadListHead) != FALSE);
Process->Pcb.BasePriority =
(SCHAR)PspComputeQuantumAndPriority(Process,
PsProcessPriorityBackground,
Index: ntoskrnl/se/priv.c
===================================================================
--- ntoskrnl/se/priv.c (revision 65379)
+++ ntoskrnl/se/priv.c (working copy)
@@ -446,7 +446,7 @@
PrivilegeSet->PrivilegeCount += Privileges->PrivilegeCount;
/* Free the old privilege set if it was allocated */
- if (AccessState->PrivilegesAllocated == TRUE)
+ if (AccessState->PrivilegesAllocated)
ExFreePool(AuxData->PrivilegeSet);
/* Now we are using an allocated privilege set */
Index: subsystems/win32/csrsrv/thredsup.c
===================================================================
--- subsystems/win32/csrsrv/thredsup.c (revision 65379)
+++ subsystems/win32/csrsrv/thredsup.c (working copy)
@@ -309,7 +309,7 @@
sizeof(ThreadInfo),
NULL);
if (!NT_SUCCESS(Status)) return Status;
- if (ThreadInfo == TRUE) return STATUS_THREAD_IS_TERMINATING;
+ if (ThreadInfo) return STATUS_THREAD_IS_TERMINATING;
/* Insert it into the Regular List */
InsertTailList(&Process->ThreadList, &Thread->Link);
Index: win32ss/drivers/displays/framebuf/ddenable.c
===================================================================
--- win32ss/drivers/displays/framebuf/ddenable.c (revision 65379)
+++ win32ss/drivers/displays/framebuf/ddenable.c (working copy)
@@ -38,7 +38,7 @@
{
PPDEV ppdev = (PPDEV)dhpdev;
- if (ppdev->bDDInitialized == TRUE)
+ if (ppdev->bDDInitialized)
{
return TRUE;
}
@@ -237,7 +237,7 @@
{
ppdev->pvmList = pvmList;
- if ( bDDrawHeap == TRUE)
+ if ( bDDrawHeap )
{
pvmList->dwFlags = VIDMEM_ISLINEAR ;
pvmList->fpStart = ppdev->ScreenHeight *
ppdev->ScreenDelta;
Index: win32ss/drivers/displays/framebuf/pointer.c
===================================================================
--- win32ss/drivers/displays/framebuf/pointer.c (revision 65379)
+++ win32ss/drivers/displays/framebuf/pointer.c (working copy)
@@ -110,7 +110,7 @@
VOID FASTCALL
IntShowMousePointer(PPDEV ppdev, SURFOBJ *DestSurface)
{
- if (ppdev->PointerAttributes.Enable == TRUE)
+ if (ppdev->PointerAttributes.Enable)
{
return;
}
Index: win32ss/drivers/displays/framebufacc/ddenable.c
===================================================================
--- win32ss/drivers/displays/framebufacc/ddenable.c (revision 65379)
+++ win32ss/drivers/displays/framebufacc/ddenable.c (working copy)
@@ -38,7 +38,7 @@
{
PPDEV ppdev = (PPDEV)dhpdev;
- if (ppdev->bDDInitialized == TRUE)
+ if (ppdev->bDDInitialized)
{
return TRUE;
}
@@ -237,7 +237,7 @@
{
ppdev->pvmList = pvmList;
- if ( bDDrawHeap == TRUE)
+ if ( bDDrawHeap )
{
pvmList->dwFlags = VIDMEM_ISLINEAR ;
pvmList->fpStart = ppdev->ScreenHeight *
ppdev->ScreenDelta;
Index: win32ss/drivers/displays/vga/main/enable.c
===================================================================
--- win32ss/drivers/displays/vga/main/enable.c (revision 65379)
+++ win32ss/drivers/displays/vga/main/enable.c (working copy)
@@ -302,7 +302,7 @@
PPDEV ppdev = (PPDEV)DPev;
ULONG returnedDataLength;
- if(Enable==TRUE)
+ if(Enable)
{
/* Reenable our graphics mode */
if (!InitPointer(ppdev))
Index: win32ss/drivers/displays/vga/vgavideo/vgavideo.c
===================================================================
--- win32ss/drivers/displays/vga/vgavideo/vgavideo.c (revision 65379)
+++ win32ss/drivers/displays/vga/vgavideo/vgavideo.c (working copy)
@@ -560,7 +560,7 @@
pb++;
}
- if (edgePixel == TRUE)
+ if (edgePixel)
{
b1 = *pb;
if(b1 != trans) vgaPutPixel(x2, j, b1);
Index: win32ss/drivers/videoprt/interrupt.c
===================================================================
--- win32ss/drivers/videoprt/interrupt.c (revision 65379)
+++ win32ss/drivers/videoprt/interrupt.c (working copy)
@@ -135,7 +135,7 @@
DeviceExtension->InterruptLevel);
/* Make sure the interrupt was valid */
- ASSERT(InterruptValid == TRUE);
+ ASSERT(InterruptValid != FALSE);
/* Return to caller */
return NO_ERROR;
Index: win32ss/gdi/dib/floodfill.c
===================================================================
--- win32ss/gdi/dib/floodfill.c (revision 65379)
+++ win32ss/gdi/dib/floodfill.c (working copy)
@@ -61,7 +61,7 @@
{
if (RECTL_bPointInRect(DstRect,x,y))
{
- if (isSurf == TRUE &&
+ if (isSurf &&
DibFunctionsForBitmapFormat[DstSurf->iBitmapFormat].DIB_GetPixel(DstSurf, x,
y) != Color)
{
return;
Index: win32ss/gdi/gdi32/misc/gdientry.c
===================================================================
--- win32ss/gdi/gdi32/misc/gdientry.c (revision 65379)
+++ win32ss/gdi/gdi32/misc/gdientry.c (working copy)
@@ -1837,7 +1837,7 @@
{
/* Free it */
Return =
NtGdiDdDeleteDirectDrawObject((HANDLE)pDirectDrawGlobal->hDD);
- if (Return == TRUE)
+ if (Return)
{
pDirectDrawGlobal->hDD = 0;
}
@@ -1852,7 +1852,7 @@
{
/* Delete the object */
Return = NtGdiDdDeleteDirectDrawObject(ghDirectDraw);
- if (Return == TRUE)
+ if (Return)
{
ghDirectDraw = 0;
}
Index: win32ss/gdi/ntgdi/gdipool.c
===================================================================
--- win32ss/gdi/ntgdi/gdipool.c (revision 65379)
+++ win32ss/gdi/ntgdi/gdipool.c (working copy)
@@ -262,7 +262,7 @@
ulIndex = cjOffset / pPool->cjAllocSize;
/* Mark it as free */
- ASSERT(RtlTestBit(&pSection->bitmap, ulIndex) == TRUE);
+ ASSERT(RtlTestBit(&pSection->bitmap, ulIndex) != FALSE);
RtlClearBit(&pSection->bitmap, ulIndex);
/* Decrease allocation count */
Index: win32ss/user/ntuser/hotkey.c
===================================================================
--- win32ss/user/ntuser/hotkey.c (revision 65379)
+++ win32ss/user/ntuser/hotkey.c (working copy)
@@ -212,7 +212,7 @@
if (!bIsDown)
{
/* WIN and F12 keys are not hardcoded here. See comments
on top of this file. */
- if (pHotKey->id == IDHK_WINKEY && bWinHotkeyActive == TRUE)
+ if (pHotKey->id == IDHK_WINKEY && bWinHotkeyActive)
{
pWnd = ValidateHwndNoErr(InputWindowStation->ShellWindow);
if (pWnd)
Index: win32ss/user/ntuser/message.c
===================================================================
--- win32ss/user/ntuser/message.c (revision 65379)
+++ win32ss/user/ntuser/message.c (working copy)
@@ -2087,7 +2087,7 @@
UserLeave();
- if (Ret == TRUE)
+ if (Ret)
{
_SEH2_TRY
{
Index: win32ss/user/ntuser/msgqueue.c
===================================================================
--- win32ss/user/ntuser/msgqueue.c (revision 65379)
+++ win32ss/user/ntuser/msgqueue.c (working copy)
@@ -805,7 +805,7 @@
*Message->Result = Result;
}
- if (Message->HasPackedLParam == TRUE)
+ if (Message->HasPackedLParam)
{
if (Message->Msg.lParam)
ExFreePool((PVOID)Message->Msg.lParam);
@@ -887,7 +887,7 @@
KeSetEvent(SentMessage->CompletionEvent, IO_NO_INCREMENT,
FALSE);
}
- if (SentMessage->HasPackedLParam == TRUE)
+ if (SentMessage->HasPackedLParam)
{
if (SentMessage->Msg.lParam)
ExFreePool((PVOID)SentMessage->Msg.lParam);
@@ -1966,7 +1966,7 @@
KeSetEvent(CurrentSentMessage->CompletionEvent,
IO_NO_INCREMENT, FALSE);
}
- if (CurrentSentMessage->HasPackedLParam == TRUE)
+ if (CurrentSentMessage->HasPackedLParam)
{
if (CurrentSentMessage->Msg.lParam)
ExFreePool((PVOID)CurrentSentMessage->Msg.lParam);
@@ -1998,7 +1998,7 @@
KeSetEvent(CurrentSentMessage->CompletionEvent,
IO_NO_INCREMENT, FALSE);
}
- if (CurrentSentMessage->HasPackedLParam == TRUE)
+ if (CurrentSentMessage->HasPackedLParam)
{
if (CurrentSentMessage->Msg.lParam)
ExFreePool((PVOID)CurrentSentMessage->Msg.lParam);
Index: win32ss/user/ntuser/window.c
===================================================================
--- win32ss/user/ntuser/window.c (revision 65379)
+++ win32ss/user/ntuser/window.c (working copy)
@@ -654,7 +654,7 @@
PCLS Class;
WNDPROC gcpd, Ret = 0;
- ASSERT(UserIsEnteredExclusive() == TRUE);
+ ASSERT(UserIsEnteredExclusive() != FALSE);
Class = pWnd->pcls;
Index: win32ss/user/user32/controls/appswitch.c
===================================================================
--- win32ss/user/user32/controls/appswitch.c (revision 65379)
+++ win32ss/user/user32/controls/appswitch.c (working copy)
@@ -522,7 +522,7 @@
return TRUE;
case WM_SHOWWINDOW:
- if (wParam == TRUE)
+ if (wParam)
{
PrepareWindow();
ati = (PALTTABINFO)GetWindowLongPtrW(hWnd, 0);
Index: win32ss/user/user32/misc/desktop.c
===================================================================
--- win32ss/user/user32/misc/desktop.c (revision 65379)
+++ win32ss/user/user32/misc/desktop.c (working copy)
@@ -610,7 +610,7 @@
GetProcessWindowStation(),
0);
- if( fInherit == TRUE )
+ if( fInherit )
{
ObjectAttributes.Attributes |= OBJ_INHERIT;
}
Index: win32ss/user/user32/misc/winsta.c
===================================================================
--- win32ss/user/user32/misc/winsta.c (revision 65379)
+++ win32ss/user/user32/misc/winsta.c (working copy)
@@ -372,7 +372,7 @@
hWindowStationsDir,
0);
- if( fInherit == TRUE )
+ if( fInherit )
{
ObjectAttributes.Attributes |= OBJ_INHERIT;
}
Index: win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
===================================================================
--- win32ss/user/winsrv/consrv/frontends/gui/conwnd.c (revision 65379)
+++ win32ss/user/winsrv/consrv/frontends/gui/conwnd.c (working copy)
@@ -1784,7 +1784,7 @@
static VOID
Copy(PGUI_CONSOLE_DATA GuiData)
{
- if (OpenClipboard(GuiData->hWindow) == TRUE)
+ if (OpenClipboard(GuiData->hWindow))
{
PCONSOLE_SCREEN_BUFFER Buffer = GuiData->ActiveBuffer;
@@ -1814,7 +1814,7 @@
static VOID
Paste(PGUI_CONSOLE_DATA GuiData)
{
- if (OpenClipboard(GuiData->hWindow) == TRUE)
+ if (OpenClipboard(GuiData->hWindow))
{
PCONSOLE_SCREEN_BUFFER Buffer = GuiData->ActiveBuffer;
Index: win32ss/user/winsrv/consrv_new/frontends/gui/guiterm.c
===================================================================
--- win32ss/user/winsrv/consrv_new/frontends/gui/guiterm.c (revision 65379)
+++ win32ss/user/winsrv/consrv_new/frontends/gui/guiterm.c (working copy)
@@ -1336,7 +1336,7 @@
static VOID
GuiConsoleCopy(PGUI_CONSOLE_DATA GuiData)
{
- if (OpenClipboard(GuiData->hWindow) == TRUE)
+ if (OpenClipboard(GuiData->hWindow))
{
PCONSOLE Console = GuiData->Console;
PCONSOLE_SCREEN_BUFFER Buffer =
ConDrvGetActiveScreenBuffer(Console);
@@ -1364,7 +1364,7 @@
static VOID
GuiConsolePaste(PGUI_CONSOLE_DATA GuiData)
{
- if (OpenClipboard(GuiData->hWindow) == TRUE)
+ if (OpenClipboard(GuiData->hWindow))
{
PCONSOLE Console = GuiData->Console;
PCONSOLE_SCREEN_BUFFER Buffer =
ConDrvGetActiveScreenBuffer(Console);
Index: win32ss/user/winsrv/usersrv/register.c
===================================================================
--- win32ss/user/winsrv/usersrv/register.c (revision 65379)
+++ win32ss/user/winsrv/usersrv/register.c (working copy)
@@ -53,7 +53,7 @@
{
PUSER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest =
&((PUSER_API_MESSAGE)ApiMessage)->Data.RegisterServicesProcessRequest;
- if (ServicesProcessIdValid == TRUE)
+ if (ServicesProcessIdValid)
{
/* Only accept a single call */
return STATUS_INVALID_PARAMETER;