Nice work though.
On 12 November 2014 13:41, David Quintana (gigaherz) <gigaherz(a)gmail.com>
wrote:
It's a common practice to include giant code dumps
as attachments instead
of inlining them in the text of the mail.
It may also be a good idea to provide multiple patches based on component,
so that different people can take a look at the patches relating to their
areas of expertise.
If providing one patch per folder is too much work, then at least based on
the top-level one. applications.patch, dll.patch, ntoskrnl.patch, etc.
would be much easier to review.
On 12 November 2014 10:48, Love Nystrom <love.nystrom(a)gmail.com> wrote:
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
===================================================================