From d47bb60c1c0766e271a86314475e07a2aeb3bf16 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 1 Oct 2017 14:42:04 +0000 Subject: [PATCH] [REACTOS] Replace comparison against TRUE with comparison against FALSE Based on patch by Love Nystrom svn path=/trunk/; revision=76021 --- reactos/base/applications/calc/utl.c | 2 +- reactos/base/applications/calc/utl_mpfr.c | 2 +- reactos/base/applications/calc/winmain.c | 2 +- reactos/base/applications/charmap/settings.c | 2 +- .../applications/mscutils/servman/start.c | 4 +- .../applications/network/net/cmdAccounts.c | 2 +- .../base/applications/network/net/cmdUser.c | 2 +- reactos/base/applications/notepad/dialog.c | 2 +- reactos/base/applications/notepad/main.c | 2 +- reactos/base/applications/regedit/edit.c | 2 +- .../base/applications/sndrec32/sndrec32.cpp | 2 +- reactos/base/applications/sndvol32/dialog.c | 2 +- reactos/base/services/svchost/svchost.c | 4 +- reactos/base/setup/usetup/interface/consup.c | 2 +- reactos/base/setup/usetup/interface/usetup.c | 56 +++++++++---------- reactos/base/setup/usetup/partlist.c | 32 +++++------ reactos/base/shell/cmd/choice.c | 2 +- reactos/base/shell/cmd/console.c | 4 +- reactos/base/shell/cmd/dir.c | 4 +- reactos/base/shell/cmd/misc.c | 2 +- reactos/base/shell/cmd/ren.c | 2 +- reactos/base/system/autochk/autochk.c | 2 +- reactos/base/system/diskpart/interpreter.c | 6 +- reactos/base/system/services/database.c | 2 +- reactos/base/system/services/driver.c | 2 +- reactos/base/system/services/services.c | 2 +- reactos/dll/cpl/desk/background.c | 6 +- reactos/dll/cpl/main/mouse.c | 2 +- reactos/dll/cpl/mmsys/sounds.c | 2 +- reactos/dll/cpl/sysdm/advanced.c | 2 +- reactos/dll/cpl/sysdm/virtmem.c | 2 +- reactos/dll/directx/d3d9/adapter.c | 4 +- reactos/dll/directx/d3d9/d3d9_create.c | 4 +- reactos/dll/directx/d3d9/d3d9_impl.c | 6 +- .../directx/ddraw/Ddraw/GetDeviceIdentifier.c | 2 +- .../directx/ddraw/Ddraw/ddraw_displaymode.c | 4 +- reactos/dll/directx/dsound_new/directsound.c | 4 +- reactos/dll/directx/wine/dsound/mixer.c | 2 +- reactos/dll/win32/advapi32/reg/reg.c | 2 +- reactos/dll/win32/advapi32/sec/misc.c | 2 +- reactos/dll/win32/advapi32/service/scm.c | 4 +- reactos/dll/win32/advapi32/service/sctrl.c | 2 +- reactos/dll/win32/kernel32/client/appcache.c | 2 +- .../dll/win32/kernel32/client/console/init.c | 2 +- reactos/dll/win32/kernel32/client/dllmain.c | 2 +- reactos/dll/win32/kernel32/client/power.c | 2 +- reactos/dll/win32/kernel32/client/proc.c | 2 +- reactos/dll/win32/lsasrv/authport.c | 4 +- reactos/dll/win32/lsasrv/lsarpc.c | 6 +- reactos/dll/win32/lsasrv/privileges.c | 2 +- reactos/dll/win32/msports/classinst.c | 2 +- reactos/dll/win32/msv1_0/msv1_0.c | 2 +- reactos/dll/win32/netapi32/user.c | 2 +- reactos/dll/win32/samsrv/samrpc.c | 8 +-- reactos/dll/win32/samsrv/setup.c | 2 +- reactos/dll/win32/serialui/serialui.c | 2 +- reactos/dll/win32/shimgvw/shimgvw.c | 2 +- reactos/dll/win32/shlwapi/path.c | 2 +- reactos/dll/win32/uxtheme/system.c | 2 +- reactos/dll/win32/uxtheme/themehooks.c | 4 +- reactos/dll/win32/wshtcpip/wshtcpip.c | 22 ++++---- reactos/drivers/bus/acpi/pnp.c | 2 +- reactos/drivers/filesystems/cdfs/dirctl.c | 2 +- reactos/drivers/ksfilter/ks/misc.c | 2 +- .../multimedia/audio/mpu401_nt4/mpu401.c | 2 +- .../multimedia/audio/sndblst.old/sndblst.c | 2 +- reactos/drivers/storage/class/disk_new/disk.c | 6 +- reactos/drivers/storage/class/disk_new/part.c | 2 +- reactos/drivers/storage/class/disk_new/pnp.c | 2 +- reactos/drivers/storage/classpnp/autorun.c | 4 +- reactos/drivers/storage/classpnp/class.c | 4 +- reactos/drivers/storage/classpnp/obsolete.c | 2 +- reactos/drivers/storage/classpnp/power.c | 10 ++-- reactos/drivers/storage/ide/atapi/atapi.c | 6 +- reactos/drivers/storage/ide/uniata/id_ata.cpp | 6 +- reactos/drivers/usb/usbohci/usb_request.cpp | 4 +- .../drivers/wdm/audio/backpln/portcls/irp.cpp | 2 +- .../wdm/audio/backpln/portcls/irpstream.cpp | 7 ++- .../audio/backpln/portcls/pin_wavecyclic.cpp | 2 +- .../drivers/wdm/audio/legacy/stream/helper.c | 2 +- reactos/hal/halppc/generic/bus.c | 2 +- reactos/hal/halppc/generic/display.c | 2 +- reactos/hal/halx86/acpi/busemul.c | 2 +- 83 files changed, 173 insertions(+), 172 deletions(-) diff --git a/reactos/base/applications/calc/utl.c b/reactos/base/applications/calc/utl.c index 8044d6f7765..c240bf2855d 100644 --- a/reactos/base/applications/calc/utl.c +++ b/reactos/base/applications/calc/utl.c @@ -19,7 +19,7 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base) #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 != FALSE) || (width > MAX_LD_WIDTH) || (width < -MAX_LD_WIDTH)) _stprintf(buffer, TEXT("%#e"), rpn->f); else { TCHAR *ptr, *dst; diff --git a/reactos/base/applications/calc/utl_mpfr.c b/reactos/base/applications/calc/utl_mpfr.c index 7c919852f54..048b3b92c65 100644 --- a/reactos/base/applications/calc/utl_mpfr.c +++ b/reactos/base/applications/calc/utl_mpfr.c @@ -39,7 +39,7 @@ void prepare_rpn_result_2(calc_number_t *rpn, TCHAR *buffer, int size, int base) 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 != FALSE) || (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); diff --git a/reactos/base/applications/calc/winmain.c b/reactos/base/applications/calc/winmain.c index 3f49a5409e3..02c93a5959c 100644 --- a/reactos/base/applications/calc/winmain.c +++ b/reactos/base/applications/calc/winmain.c @@ -1144,7 +1144,7 @@ static void run_sqr(calc_number_t *number) static void run_fe(calc_number_t *number) { - calc.sci_out = ((calc.sci_out == TRUE) ? FALSE : TRUE); + calc.sci_out = ((calc.sci_out != FALSE) ? FALSE : TRUE); } static void handle_context_menu(HWND hWnd, WPARAM wp, LPARAM lp) diff --git a/reactos/base/applications/charmap/settings.c b/reactos/base/applications/charmap/settings.c index e92692a9d08..6d44a259513 100644 --- a/reactos/base/applications/charmap/settings.c +++ b/reactos/base/applications/charmap/settings.c @@ -91,7 +91,7 @@ extern void LoadSettings(void) RegQueryValueEx(hKey, _T("Advanced"), NULL, &type, (LPBYTE)&dwAdvancedChecked, &size); - if(dwAdvancedChecked == TRUE) + if(dwAdvancedChecked != FALSE) SendDlgItemMessage(hCharmapDlg, IDC_CHECK_ADVANCED, BM_CLICK, MF_CHECKED, 0); RegCloseKey(hKey); diff --git a/reactos/base/applications/mscutils/servman/start.c b/reactos/base/applications/mscutils/servman/start.c index 5251fb3b6fe..ac237e2d28b 100644 --- a/reactos/base/applications/mscutils/servman/start.c +++ b/reactos/base/applications/mscutils/servman/start.c @@ -43,7 +43,7 @@ DoStartService(LPWSTR ServiceName, } else { - if (bWhiteSpace == TRUE) + if (bWhiteSpace != FALSE) { dwArgsCount++; bWhiteSpace = FALSE; @@ -74,7 +74,7 @@ DoStartService(LPWSTR ServiceName, } else { - if (bWhiteSpace == TRUE) + if (bWhiteSpace != FALSE) { lpArgsVector[dwArgsCount] = lpChar; dwArgsCount++; diff --git a/reactos/base/applications/network/net/cmdAccounts.c b/reactos/base/applications/network/net/cmdAccounts.c index 792831d63b3..ff986f90116 100644 --- a/reactos/base/applications/network/net/cmdAccounts.c +++ b/reactos/base/applications/network/net/cmdAccounts.c @@ -151,7 +151,7 @@ cmdAccounts( } } - if (Modified == TRUE) + if (Modified != FALSE) { Status = NetUserModalsSet(NULL, 0, (LPBYTE)Info0, &ParamErr); if (Status != NERR_Success) diff --git a/reactos/base/applications/network/net/cmdUser.c b/reactos/base/applications/network/net/cmdUser.c index e4053eab63d..2c65db0cc68 100644 --- a/reactos/base/applications/network/net/cmdUser.c +++ b/reactos/base/applications/network/net/cmdUser.c @@ -617,7 +617,7 @@ cmdUser( } done: - if (bPasswordAllocated == TRUE && lpPassword != NULL) + if ((bPasswordAllocated != FALSE) && (lpPassword != NULL)) HeapFree(GetProcessHeap(), 0, lpPassword); if (!bAdd && !bDelete && pUserInfo != NULL) diff --git a/reactos/base/applications/notepad/dialog.c b/reactos/base/applications/notepad/dialog.c index a2fe5ffd3ac..04e6e7b8375 100644 --- a/reactos/base/applications/notepad/dialog.c +++ b/reactos/base/applications/notepad/dialog.c @@ -849,7 +849,7 @@ VOID DoCreateStatusBar(VOID) } /* Set status bar visiblity according to the settings. */ - if (Globals.bWrapLongLines == TRUE || Globals.bShowStatusBar == FALSE) + if ((Globals.bWrapLongLines != FALSE) || (Globals.bShowStatusBar == FALSE)) { bStatusBarVisible = FALSE; ShowWindow(Globals.hStatusBar, SW_HIDE); diff --git a/reactos/base/applications/notepad/main.c b/reactos/base/applications/notepad/main.c index c9a145fb0fa..60d453ccb5f 100644 --- a/reactos/base/applications/notepad/main.c +++ b/reactos/base/applications/notepad/main.c @@ -393,7 +393,7 @@ NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_SIZE: { - if (Globals.bShowStatusBar == TRUE && Globals.bWrapLongLines == FALSE) + if ((Globals.bShowStatusBar != FALSE) && (Globals.bWrapLongLines == FALSE)) { RECT rcStatusBar; HDWP hdwp; diff --git a/reactos/base/applications/regedit/edit.c b/reactos/base/applications/regedit/edit.c index 28e58715afc..aa89298132d 100644 --- a/reactos/base/applications/regedit/edit.c +++ b/reactos/base/applications/regedit/edit.c @@ -1279,7 +1279,7 @@ BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin) { } } - else if (EditBin == TRUE || type == REG_NONE || type == REG_BINARY) + else if ((EditBin != FALSE) || (type == REG_NONE) || (type == REG_BINARY)) { if(valueDataLen > 0) { diff --git a/reactos/base/applications/sndrec32/sndrec32.cpp b/reactos/base/applications/sndrec32/sndrec32.cpp index 473f021731b..4ba05825b1d 100644 --- a/reactos/base/applications/sndrec32/sndrec32.cpp +++ b/reactos/base/applications/sndrec32/sndrec32.cpp @@ -540,7 +540,7 @@ WndProc(HWND hWnd, case WM_COMMAND: wmId = LOWORD(wParam); - if ((wmId >= 0) && (wmId < 5) && (butdisabled[wmId] == TRUE)) + if ((wmId >= 0) && (wmId < 5) && (butdisabled[wmId] != FALSE)) break; switch (wmId) diff --git a/reactos/base/applications/sndvol32/dialog.c b/reactos/base/applications/sndvol32/dialog.c index e7690b0dff9..857413c3740 100644 --- a/reactos/base/applications/sndvol32/dialog.c +++ b/reactos/base/applications/sndvol32/dialog.c @@ -366,7 +366,7 @@ EnumConnectionsCallback( SetDlgItemTextW(PrefContext->MixerWindow->hWnd, wID, Line->szName); /* query controls */ - if (SndMixerQueryControls(Mixer, &ControlCount, Line, &Control) == TRUE) + if (SndMixerQueryControls(Mixer, &ControlCount, Line, &Control) != FALSE) { /* now go through all controls and update their states */ for(Index = 0; Index < ControlCount; Index++) diff --git a/reactos/base/services/svchost/svchost.c b/reactos/base/services/svchost/svchost.c index 0c9b484dc79..ab89bfcba6e 100644 --- a/reactos/base/services/svchost/svchost.c +++ b/reactos/base/services/svchost/svchost.c @@ -666,7 +666,7 @@ GetServiceDllFunction ( ULONG_PTR ulCookie = 0; /* Activate the context */ - if (ActivateActCtx(pDll->hActCtx, &ulCookie) != TRUE) + if (ActivateActCtx(pDll->hActCtx, &ulCookie) == FALSE) { /* We couldn't, bail out */ if (lpdwError) *lpdwError = GetLastError(); @@ -1211,7 +1211,7 @@ CallPerInstanceInitFunctions ( pOptions->AuthenticationLevel, pOptions->ImpersonationLevel, pOptions->AuthenticationCapabilities); - if (bResult != TRUE) return FALSE; + if (bResult == FALSE) return FALSE; } /* Do we have a custom RPC stack size? */ diff --git a/reactos/base/setup/usetup/interface/consup.c b/reactos/base/setup/usetup/interface/consup.c index c0b5409a150..004f9dabf82 100644 --- a/reactos/base/setup/usetup/interface/consup.c +++ b/reactos/base/setup/usetup/interface/consup.c @@ -69,7 +69,7 @@ CONSOLE_ConInKey( ReadConsoleInput(StdInput, Buffer, 1, &Read); if ((Buffer->EventType == KEY_EVENT) - && (Buffer->Event.KeyEvent.bKeyDown == TRUE)) + && (Buffer->Event.KeyEvent.bKeyDown != FALSE)) break; } } diff --git a/reactos/base/setup/usetup/interface/usetup.c b/reactos/base/setup/usetup/interface/usetup.c index 03efba566cb..38085569d74 100644 --- a/reactos/base/setup/usetup/interface/usetup.c +++ b/reactos/base/setup/usetup/interface/usetup.c @@ -257,7 +257,7 @@ PopupError(PCCH Text, if (Length > MaxLength) MaxLength = Length; - if (LastLine == TRUE) + if (LastLine != FALSE) break; pnext = p + 1; @@ -323,7 +323,7 @@ PopupError(PCCH Text, &Written); } - if (LastLine == TRUE) + if (LastLine != FALSE) break; coPos.Y++; @@ -708,7 +708,7 @@ LanguagePage(PINPUT_RECORD Ir) else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; else RedrawGenericList(LanguageList); @@ -980,7 +980,7 @@ IntroPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -1110,7 +1110,7 @@ InstallIntroPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -1147,7 +1147,7 @@ ScsiControllerPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -1285,7 +1285,7 @@ DeviceSettingsPage(PINPUT_RECORD Ir) else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -1349,7 +1349,7 @@ HandleGenericList(PGENERIC_LIST GenericList, else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; continue; @@ -1637,7 +1637,7 @@ SelectPartitionPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) { DestroyPartitionList(PartitionList); PartitionList = NULL; @@ -1721,7 +1721,7 @@ SelectPartitionPage(PINPUT_RECORD Ir) } else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'L') /* L */ { - if (PartitionList->CurrentPartition->LogicalPartition == TRUE) + if (PartitionList->CurrentPartition->LogicalPartition != FALSE) { Error = LogicalPartitionCreationChecks(PartitionList); if (Error != NOT_AN_ERROR) @@ -1977,14 +1977,14 @@ CreatePrimaryPartitionPage(PINPUT_RECORD Ir) ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left, top, right, bottom */ MaxSize, InputBuffer, &Quit, &Cancel); - if (Quit == TRUE) + if (Quit != FALSE) { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; } - else if (Cancel == TRUE) + else if (Cancel != FALSE) { return SELECT_PARTITION_PAGE; } @@ -2134,14 +2134,14 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir) ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left, top, right, bottom */ MaxSize, InputBuffer, &Quit, &Cancel); - if (Quit == TRUE) + if (Quit != FALSE) { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; } - else if (Cancel == TRUE) + else if (Cancel != FALSE) { return SELECT_PARTITION_PAGE; } @@ -2290,14 +2290,14 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir) ShowPartitionSizeInputBox(12, 14, xScreen - 12, 17, /* left, top, right, bottom */ MaxSize, InputBuffer, &Quit, &Cancel); - if (Quit == TRUE) + if (Quit != FALSE) { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; } - else if (Cancel == TRUE) + else if (Cancel != FALSE) { return SELECT_PARTITION_PAGE; } @@ -2514,7 +2514,7 @@ DeletePartitionPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -2705,7 +2705,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) PartTypeString, ARRAYSIZE(PartTypeString)); - if (PartEntry->AutoCreate == TRUE) + if (PartEntry->AutoCreate != FALSE) { CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NEWPARTITION)); @@ -2731,7 +2731,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) PartEntry->AutoCreate = FALSE; } - else if (PartEntry->New == TRUE) + else if (PartEntry->New != FALSE) { switch (PartitionList->FormatState) { @@ -2828,7 +2828,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -2924,7 +2924,7 @@ FormatPartitionPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -3312,7 +3312,7 @@ InstallDirectoryPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -4225,7 +4225,7 @@ BootLoaderPage(PINPUT_RECORD Ir) InstallOnFloppy = TRUE; } - if (InstallOnFloppy == TRUE) + if (InstallOnFloppy != FALSE) { return BOOT_LOADER_FLOPPY_PAGE; } @@ -4274,7 +4274,7 @@ BootLoaderPage(PINPUT_RECORD Ir) else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; @@ -4335,7 +4335,7 @@ BootLoaderFloppyPage(PINPUT_RECORD Ir) if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) && (Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */ { - if (ConfirmQuit(Ir) == TRUE) + if (ConfirmQuit(Ir) != FALSE) return QUIT_PAGE; break; diff --git a/reactos/base/setup/usetup/partlist.c b/reactos/base/setup/usetup/partlist.c index dae830badc5..b047a227b59 100644 --- a/reactos/base/setup/usetup/partlist.c +++ b/reactos/base/setup/usetup/partlist.c @@ -673,7 +673,7 @@ AddPartitionToDisk( PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[PartitionIndex]; if (PartitionInfo->PartitionType == 0 || - (LogicalPartition == TRUE && IsContainerPartition(PartitionInfo->PartitionType))) + ((LogicalPartition != FALSE) && IsContainerPartition(PartitionInfo->PartitionType))) return; PartEntry = RtlAllocateHeap(ProcessHeap, @@ -1665,11 +1665,11 @@ PrintPartitionData( { /* Determine partition type */ PartTypeString[0] = '\0'; - if (PartEntry->New == TRUE) + if (PartEntry->New != FALSE) { PartType = MUIGetString(STRING_UNFORMATTED); } - else if (PartEntry->IsPartitioned == TRUE) + else if (PartEntry->IsPartitioned != FALSE) { GetPartTypeStringFromPartitionType(PartEntry->PartitionType, PartTypeString, @@ -2224,7 +2224,7 @@ ScrollDownPartitionList( { /* Primary or extended partition */ - if (List->CurrentPartition->IsPartitioned == TRUE && + if ((List->CurrentPartition->IsPartitioned != FALSE) && IsContainerPartition(List->CurrentPartition->PartitionType)) { /* First logical partition */ @@ -2318,7 +2318,7 @@ ScrollUpPartitionList( { PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry); - if (PartEntry->IsPartitioned == TRUE && + if ((PartEntry->IsPartitioned != FALSE) && IsContainerPartition(PartEntry->PartitionType)) { PartListEntry = List->CurrentDisk->LogicalPartListHead.Blink; @@ -2343,7 +2343,7 @@ ScrollUpPartitionList( { PartEntry = CONTAINING_RECORD(PartListEntry, PARTENTRY, ListEntry); - if (PartEntry->IsPartitioned == TRUE && + if ((PartEntry->IsPartitioned != FALSE) && IsContainerPartition(PartEntry->PartitionType)) { PartListEntry = DiskEntry->LogicalPartListHead.Blink; @@ -2526,7 +2526,7 @@ UpdateDiskLayout( { PartEntry = CONTAINING_RECORD(ListEntry, PARTENTRY, ListEntry); - if (PartEntry->IsPartitioned == TRUE) + if (PartEntry->IsPartitioned != FALSE) { PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[Index]; @@ -2727,7 +2727,7 @@ CreatePrimaryPartition( if (List == NULL || List->CurrentDisk == NULL || List->CurrentPartition == NULL || - List->CurrentPartition->IsPartitioned == TRUE) + List->CurrentPartition->IsPartitioned != FALSE) { return; } @@ -2737,8 +2737,8 @@ CreatePrimaryPartition( DPRINT1("Current partition sector count: %I64u\n", PartEntry->SectorCount.QuadPart); - if (AutoCreate == TRUE || - AlignDown(PartEntry->StartSector.QuadPart + SectorCount, DiskEntry->SectorAlignment) - PartEntry->StartSector.QuadPart == PartEntry->SectorCount.QuadPart) + if ((AutoCreate != FALSE) || + (AlignDown(PartEntry->StartSector.QuadPart + SectorCount, DiskEntry->SectorAlignment) - PartEntry->StartSector.QuadPart == PartEntry->SectorCount.QuadPart)) { DPRINT1("Convert existing partition entry\n"); @@ -2845,7 +2845,7 @@ CreateExtendedPartition( if (List == NULL || List->CurrentDisk == NULL || List->CurrentPartition == NULL || - List->CurrentPartition->IsPartitioned == TRUE) + (List->CurrentPartition->IsPartitioned != FALSE)) { return; } @@ -2955,7 +2955,7 @@ CreateLogicalPartition( if (List == NULL || List->CurrentDisk == NULL || List->CurrentPartition == NULL || - List->CurrentPartition->IsPartitioned == TRUE) + List->CurrentPartition->IsPartitioned != FALSE) { return; } @@ -3475,7 +3475,7 @@ WritePartitionsToDisk( { DiskEntry = CONTAINING_RECORD(Entry, DISKENTRY, ListEntry); - if (DiskEntry->Dirty == TRUE) + if (DiskEntry->Dirty != FALSE) { WritePartitions(List, DiskEntry); DiskEntry->Dirty = FALSE; @@ -3548,7 +3548,7 @@ PrimaryPartitionCreationChecks( PartEntry = List->CurrentPartition; /* Fail if partition is already in use */ - if (PartEntry->IsPartitioned == TRUE) + if (PartEntry->IsPartitioned != FALSE) return ERROR_NEW_PARTITION; /* Fail if there are already 4 primary partitions in the list */ @@ -3570,7 +3570,7 @@ ExtendedPartitionCreationChecks( PartEntry = List->CurrentPartition; /* Fail if partition is already in use */ - if (PartEntry->IsPartitioned == TRUE) + if (PartEntry->IsPartitioned != FALSE) return ERROR_NEW_PARTITION; /* Fail if there are already 4 primary partitions in the list */ @@ -3596,7 +3596,7 @@ LogicalPartitionCreationChecks( PartEntry = List->CurrentPartition; /* Fail if partition is already in use */ - if (PartEntry->IsPartitioned == TRUE) + if (PartEntry->IsPartitioned != FALSE) return ERROR_NEW_PARTITION; return ERROR_SUCCESS; diff --git a/reactos/base/shell/cmd/choice.c b/reactos/base/shell/cmd/choice.c index 70d8d430bb5..8cf7c5e665a 100644 --- a/reactos/base/shell/cmd/choice.c +++ b/reactos/base/shell/cmd/choice.c @@ -56,7 +56,7 @@ GetCharacterTimeout (LPTCH ch, DWORD dwMilliseconds) //if the event is a key pressed if ((lpBuffer.EventType == KEY_EVENT) && - (lpBuffer.Event.KeyEvent.bKeyDown == TRUE)) + (lpBuffer.Event.KeyEvent.bKeyDown != FALSE)) { //read the key #ifdef _UNICODE diff --git a/reactos/base/shell/cmd/console.c b/reactos/base/shell/cmd/console.c index 346d49749f1..2514f032459 100644 --- a/reactos/base/shell/cmd/console.c +++ b/reactos/base/shell/cmd/console.c @@ -91,7 +91,7 @@ VOID ConInKey(PINPUT_RECORD lpBuffer) { ReadConsoleInput(hInput, lpBuffer, 1, &dwRead); if ((lpBuffer->EventType == KEY_EVENT) && - (lpBuffer->Event.KeyEvent.bKeyDown == TRUE)) + (lpBuffer->Event.KeyEvent.bKeyDown != FALSE)) break; } while (TRUE); @@ -361,7 +361,7 @@ BOOL ConPrintfVPaging(DWORD nStdHandle, BOOL NewPage, LPTSTR szFormat, va_list a int from = 0, i = 0; - if (NewPage == TRUE) + if (NewPage != FALSE) LineCount = 0; /* Reset LineCount and return if no string has been given */ diff --git a/reactos/base/shell/cmd/dir.c b/reactos/base/shell/cmd/dir.c index ffd03a944d6..2669a0192e2 100644 --- a/reactos/base/shell/cmd/dir.c +++ b/reactos/base/shell/cmd/dir.c @@ -731,7 +731,7 @@ GetUserDiskFreeSpace(LPCTSTR lpRoot, #endif if (pGetFreeDiskSpaceEx != NULL) { - if (pGetFreeDiskSpaceEx(lpRoot, lpFreeSpace, &TotalNumberOfBytes, &TotalNumberOfFreeBytes) == TRUE) + if (pGetFreeDiskSpaceEx(lpRoot, lpFreeSpace, &TotalNumberOfBytes, &TotalNumberOfFreeBytes) != FALSE) return; } } @@ -1392,7 +1392,7 @@ DirList(LPTSTR szPath, /* [IN] The path that dir starts */ 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 != FALSE)) { continue; /* Here we filter all the specified attributes */ diff --git a/reactos/base/shell/cmd/misc.c b/reactos/base/shell/cmd/misc.c index cfe317cd337..6fe9dbc40c1 100644 --- a/reactos/base/shell/cmd/misc.c +++ b/reactos/base/shell/cmd/misc.c @@ -48,7 +48,7 @@ cgetchar (VOID) { ReadConsoleInput (hInput, &irBuffer, 1, &dwRead); if ((irBuffer.EventType == KEY_EVENT) && - (irBuffer.Event.KeyEvent.bKeyDown == TRUE)) + (irBuffer.Event.KeyEvent.bKeyDown != FALSE)) { if (irBuffer.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) diff --git a/reactos/base/shell/cmd/ren.c b/reactos/base/shell/cmd/ren.c index a3d46889113..7a19e4ad379 100644 --- a/reactos/base/shell/cmd/ren.c +++ b/reactos/base/shell/cmd/ren.c @@ -286,7 +286,7 @@ INT cmd_rename (LPTSTR param) } *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 != FALSE) { _tcscpy(srcFinal,srcPath); _tcscat(srcFinal,f.cFileName); diff --git a/reactos/base/system/autochk/autochk.c b/reactos/base/system/autochk/autochk.c index 5ebefb6e5eb..cc94858db3a 100644 --- a/reactos/base/system/autochk/autochk.c +++ b/reactos/base/system/autochk/autochk.c @@ -235,7 +235,7 @@ ChkdskCallback( case DONE: Status = (PBOOLEAN)Argument; - if (*Status == TRUE) + if (*Status != FALSE) { PrintString("Autochk was unable to complete successfully.\r\n\r\n"); // Error = TRUE; diff --git a/reactos/base/system/diskpart/interpreter.c b/reactos/base/system/diskpart/interpreter.c index 6f6a49d5951..4e22a6d646e 100644 --- a/reactos/base/system/diskpart/interpreter.c +++ b/reactos/base/system/diskpart/interpreter.c @@ -114,7 +114,7 @@ InterpretScript(LPWSTR input_line) } else { - if ((bWhiteSpace == TRUE) && (args_count < MAX_ARGS_COUNT)) + if ((bWhiteSpace != FALSE) && (args_count < MAX_ARGS_COUNT)) { args_vector[args_count] = ptr; args_count++; @@ -147,7 +147,7 @@ InterpretMain(VOID) BOOL bRun = TRUE; LPWSTR ptr; - while (bRun == TRUE) + while (bRun != FALSE) { args_count = 0; memset(args_vector, 0, sizeof(args_vector)); @@ -168,7 +168,7 @@ InterpretMain(VOID) } else { - if ((bWhiteSpace == TRUE) && (args_count < MAX_ARGS_COUNT)) + if ((bWhiteSpace != FALSE) && (args_count < MAX_ARGS_COUNT)) { args_vector[args_count] = ptr; args_count++; diff --git a/reactos/base/system/services/database.c b/reactos/base/system/services/database.c index 176ba15e3f5..aa176c0885c 100644 --- a/reactos/base/system/services/database.c +++ b/reactos/base/system/services/database.c @@ -817,7 +817,7 @@ ScmDeleteMarkedServices(VOID) ServiceEntry = ServiceEntry->Flink; - if (CurrentService->bDeleted == TRUE) + if (CurrentService->bDeleted != FALSE) { dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"System\\CurrentControlSet\\Services", diff --git a/reactos/base/system/services/driver.c b/reactos/base/system/services/driver.c index 0f03c294a21..34be894659a 100644 --- a/reactos/base/system/services/driver.c +++ b/reactos/base/system/services/driver.c @@ -215,7 +215,7 @@ ScmGetDriverStatus(PSERVICE lpService, return RtlNtStatusToDosError(Status); } - if ((bFound == TRUE) && + if ((bFound != FALSE) && (lpService->Status.dwCurrentState != SERVICE_STOP_PENDING)) { if (lpService->Status.dwCurrentState == SERVICE_STOPPED) diff --git a/reactos/base/system/services/services.c b/reactos/base/system/services/services.c index 36be49885e2..58a6256efe4 100644 --- a/reactos/base/system/services/services.c +++ b/reactos/base/system/services/services.c @@ -436,7 +436,7 @@ done: ScmShutdownSecurity(); /* Delete our communication named pipe's critical section */ - if (bCanDeleteNamedPipeCriticalSection == TRUE) + if (bCanDeleteNamedPipeCriticalSection != FALSE) ScmDeleteNamedPipeCriticalSection(); /* Close the shutdown event */ diff --git a/reactos/dll/cpl/desk/background.c b/reactos/dll/cpl/desk/background.c index 2ade68422e9..6d0a018b591 100644 --- a/reactos/dll/cpl/desk/background.c +++ b/reactos/dll/cpl/desk/background.c @@ -669,7 +669,7 @@ OnBrowseButton(HWND hwndDlg, PDATA pData) if (success) { /* Check if there is already a entry that holds this filename */ - if (CheckListViewFilenameExists(hwndBackgroundList, ofn.lpstrFileTitle) == TRUE) + if (CheckListViewFilenameExists(hwndBackgroundList, ofn.lpstrFileTitle) != FALSE) return; if (pData->listViewItemCount > (MAX_BACKGROUNDS - 1)) @@ -729,7 +729,7 @@ ListViewItemChanged(HWND hwndDlg, PDATA pData, int itemIndex) pData->pWallpaperBitmap = NULL; } - if (backgroundItem->bWallpaper == TRUE) + if (backgroundItem->bWallpaper != FALSE) { pData->pWallpaperBitmap = DibLoadImage(backgroundItem->szFilename); @@ -937,7 +937,7 @@ SetWallpaper(PDATA pData) RegSetValueEx(regKey, TEXT("WallpaperStyle"), 0, REG_SZ, (LPBYTE)TEXT("2"), sizeof(TCHAR) * 2); } - if (pData->backgroundItems[pData->backgroundSelection].bWallpaper == TRUE) + if (pData->backgroundItems[pData->backgroundSelection].bWallpaper != FALSE) { GdipLoadImageFromFile(pData->backgroundItems[pData->backgroundSelection].szFilename, &image); if (!image) diff --git a/reactos/dll/cpl/main/mouse.c b/reactos/dll/cpl/main/mouse.c index 9d90054394a..a17d1795ed6 100644 --- a/reactos/dll/cpl/main/mouse.c +++ b/reactos/dll/cpl/main/mouse.c @@ -1717,7 +1717,7 @@ ShowDialogWheelControls(HWND hwndDlg, UINT uWheelScrollLines, BOOL bInit) SendMessage(hDlgCtrl, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); /* Set the default scroll lines value */ - if (bInit == TRUE) + if (bInit != FALSE) SetDlgItemInt(hwndDlg, IDC_EDIT_WHEEL_SCROLL_LINES, DEFAULT_WHEEL_SCROLL_LINES, FALSE); } } diff --git a/reactos/dll/cpl/mmsys/sounds.c b/reactos/dll/cpl/mmsys/sounds.c index 6368d1766c5..c993366f143 100644 --- a/reactos/dll/cpl/mmsys/sounds.c +++ b/reactos/dll/cpl/mmsys/sounds.c @@ -996,7 +996,7 @@ SoundsDlgProc(HWND hwndDlg, ofn.lpstrInitialDir = NULL; ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; - if (GetOpenFileNameW(&ofn) == TRUE) + if (GetOpenFileNameW(&ofn) != FALSE) { // FIXME search if list already contains that sound diff --git a/reactos/dll/cpl/sysdm/advanced.c b/reactos/dll/cpl/sysdm/advanced.c index ec47c07610b..873667249db 100644 --- a/reactos/dll/cpl/sysdm/advanced.c +++ b/reactos/dll/cpl/sysdm/advanced.c @@ -68,7 +68,7 @@ OnInitSysSettingsDialog(HWND hwndDlg) (LPBYTE)&dwVal, &cbData) == ERROR_SUCCESS) { - if (dwVal == TRUE) + if (dwVal != FALSE) { // set the check box SendDlgItemMessageW(hwndDlg, diff --git a/reactos/dll/cpl/sysdm/virtmem.c b/reactos/dll/cpl/sysdm/virtmem.c index 25bdb20bd21..2e6117475de 100644 --- a/reactos/dll/cpl/sysdm/virtmem.c +++ b/reactos/dll/cpl/sysdm/virtmem.c @@ -599,7 +599,7 @@ OnSelChange(HWND hwndDlg, PVIRTMEM pVirtMem) static VOID OnOk(PVIRTMEM pVirtMem) { - if (pVirtMem->bModified == TRUE) + if (pVirtMem->bModified != FALSE) { ResourceMessageBox(hApplet, NULL, diff --git a/reactos/dll/directx/d3d9/adapter.c b/reactos/dll/directx/d3d9/adapter.c index d62d97b3a40..ac11692ef5d 100644 --- a/reactos/dll/directx/d3d9/adapter.c +++ b/reactos/dll/directx/d3d9/adapter.c @@ -158,7 +158,7 @@ BOOL GetAdapterInfo(LPCSTR lpszDeviceName, D3DADAPTER_IDENTIFIER9* pIdentifier) AdapterIndex = 0; FoundDisplayDevice = FALSE; - while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) == TRUE) + while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) != FALSE) { if (_stricmp(lpszDeviceName, DisplayDevice.DeviceName) == 0) { @@ -176,7 +176,7 @@ BOOL GetAdapterInfo(LPCSTR lpszDeviceName, D3DADAPTER_IDENTIFIER9* pIdentifier) lstrcpynA(pIdentifier->Description, DisplayDevice.DeviceString, MAX_DEVICE_IDENTIFIER_STRING); lstrcpynA(pIdentifier->DeviceName, DisplayDevice.DeviceName, CCHDEVICENAME); - if (GetDriverName(&DisplayDevice, pIdentifier) == TRUE) + if (GetDriverName(&DisplayDevice, pIdentifier) != FALSE) GetDriverVersion(&DisplayDevice, pIdentifier); GetDeviceId(DisplayDevice.DeviceID, pIdentifier); diff --git a/reactos/dll/directx/d3d9/d3d9_create.c b/reactos/dll/directx/d3d9/d3d9_create.c index b92308f05e1..0d7b3617b6a 100644 --- a/reactos/dll/directx/d3d9/d3d9_create.c +++ b/reactos/dll/directx/d3d9/d3d9_create.c @@ -190,7 +190,7 @@ static BOOL GetDisplayDeviceInfo(IN OUT LPDIRECT3D9_INT pDirect3D9) D3D9_PrimaryDeviceName[0] = '\0'; AdapterIndex = 0; - while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) == TRUE && + while ((EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) != FALSE) && pDirect3D9->NumDisplayAdapters < D3D9_INT_MAX_NUM_ADAPTERS) { if ((DisplayDevice.StateFlags & (DISPLAY_DEVICE_DISCONNECT | DISPLAY_DEVICE_MIRRORING_DRIVER)) == 0 && @@ -209,7 +209,7 @@ static BOOL GetDisplayDeviceInfo(IN OUT LPDIRECT3D9_INT pDirect3D9) } AdapterIndex = 0; - while (EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) == TRUE && + while ((EnumDisplayDevicesA(NULL, AdapterIndex, &DisplayDevice, 0) != FALSE) && pDirect3D9->NumDisplayAdapters < D3D9_INT_MAX_NUM_ADAPTERS) { if ((DisplayDevice.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) != 0 && diff --git a/reactos/dll/directx/d3d9/d3d9_impl.c b/reactos/dll/directx/d3d9/d3d9_impl.c index 1f4d73ed518..457b0896e50 100644 --- a/reactos/dll/directx/d3d9/d3d9_impl.c +++ b/reactos/dll/directx/d3d9/d3d9_impl.c @@ -412,8 +412,8 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceType(LPDIRECT3D9 iface, UINT Ada return D3DERR_INVALIDCALL; } - if (BackBufferFormat == D3DFMT_UNKNOWN && - Windowed == TRUE) + if ((BackBufferFormat == D3DFMT_UNKNOWN) && + (Windowed != FALSE)) { BackBufferFormat = DisplayFormat; } @@ -595,7 +595,7 @@ static HRESULT WINAPI IDirect3D9Impl_CheckDeviceFormat(LPDIRECT3D9 iface, UINT A } pDriverCaps = &This->DisplayAdapters[Adapter].DriverCaps; - if ((Usage & D3DUSAGE_DYNAMIC) != 0 && bIsTextureRType == TRUE) + if (((Usage & D3DUSAGE_DYNAMIC) != 0) && (bIsTextureRType != FALSE)) { if ((pDriverCaps->DriverCaps9.Caps2 & D3DCAPS2_DYNAMICTEXTURES) == 0) { diff --git a/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c b/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c index 358d2e4a4c1..3f3df7a591b 100644 --- a/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c +++ b/reactos/dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c @@ -112,7 +112,7 @@ Main_DirectDraw_GetDeviceIdentifier7(LPDDRAWI_DIRECTDRAW_INT This, } } - if (found == TRUE) + if (found != FALSE) { /* we found our driver now we start setup it */ if (!_strnicmp(DisplayDeviceA.DeviceKey,"\\REGISTRY\\Machine\\",18)) diff --git a/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c b/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c index cf55e232150..5c6385b85f9 100644 --- a/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c +++ b/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c @@ -42,7 +42,7 @@ Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, DevMode.dmSize = sizeof(DEVMODE); - while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE) + while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) != FALSE) { DDSURFACEDESC SurfaceDesc; @@ -140,7 +140,7 @@ Main_DirectDraw_EnumDisplayModes4(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, DevMode.dmSize = sizeof(DEVMODE); - while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE) + while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) != FALSE) { DDSURFACEDESC2 SurfaceDesc; diff --git a/reactos/dll/directx/dsound_new/directsound.c b/reactos/dll/directx/dsound_new/directsound.c index 1a61964207f..09ec2881dbe 100644 --- a/reactos/dll/directx/dsound_new/directsound.c +++ b/reactos/dll/directx/dsound_new/directsound.c @@ -33,8 +33,8 @@ IDirectSound8_fnQueryInterface( LPOLESTR pStr; LPCDirectSoundImpl This = (LPCDirectSoundImpl)CONTAINING_RECORD(iface, CDirectSoundImpl, lpVtbl); - if ((IsEqualIID(riid, &IID_IDirectSound) && This->bDirectSound8 == FALSE) || - (IsEqualIID(riid, &IID_IDirectSound8) && This->bDirectSound8 == TRUE) || + if ((IsEqualIID(riid, &IID_IDirectSound) && This->bDirectSound8 == FALSE) || + (IsEqualIID(riid, &IID_IDirectSound8) && This->bDirectSound8 != FALSE) || (IsEqualIID(riid, &IID_IUnknown))) { *ppobj = (LPVOID)&This->lpVtbl; diff --git a/reactos/dll/directx/wine/dsound/mixer.c b/reactos/dll/directx/wine/dsound/mixer.c index 115d15c0fda..84faa4644ac 100644 --- a/reactos/dll/directx/wine/dsound/mixer.c +++ b/reactos/dll/directx/wine/dsound/mixer.c @@ -945,7 +945,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device) } /* 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 != FALSE) && (device->state == STATE_STOPPING)){ TRACE("All buffers have stopped. Stopping primary buffer\n"); device->state = STATE_STOPPED; diff --git a/reactos/dll/win32/advapi32/reg/reg.c b/reactos/dll/win32/advapi32/reg/reg.c index 42d00a33905..61845636caa 100644 --- a/reactos/dll/win32/advapi32/reg/reg.c +++ b/reactos/dll/win32/advapi32/reg/reg.c @@ -3203,7 +3203,7 @@ RegNotifyChangeKeyValue(HKEY hKey, return ERROR_INVALID_HANDLE; } - if (fAsynchronous == TRUE && hEvent == NULL) + if ((fAsynchronous != FALSE) && (hEvent == NULL)) { return ERROR_INVALID_PARAMETER; } diff --git a/reactos/dll/win32/advapi32/sec/misc.c b/reactos/dll/win32/advapi32/sec/misc.c index 1a35c0a329b..0e58a8994cf 100644 --- a/reactos/dll/win32/advapi32/sec/misc.c +++ b/reactos/dll/win32/advapi32/sec/misc.c @@ -214,7 +214,7 @@ ImpersonateLoggedOnUser(HANDLE hToken) &NewToken, sizeof(HANDLE)); - if (Duplicated == TRUE) + if (Duplicated != FALSE) { NtClose(NewToken); } diff --git a/reactos/dll/win32/advapi32/service/scm.c b/reactos/dll/win32/advapi32/service/scm.c index 0274a99e772..42aec43f7cc 100644 --- a/reactos/dll/win32/advapi32/service/scm.c +++ b/reactos/dll/win32/advapi32/service/scm.c @@ -2210,7 +2210,7 @@ QueryServiceConfig2A(SC_HANDLE hService, return FALSE; } - if (bUseTempBuffer == TRUE) + if (bUseTempBuffer != FALSE) { TRACE("RQueryServiceConfig2A() returns ERROR_INSUFFICIENT_BUFFER\n"); *pcbBytesNeeded = dwBufferSize; @@ -2328,7 +2328,7 @@ QueryServiceConfig2W(SC_HANDLE hService, return FALSE; } - if (bUseTempBuffer == TRUE) + if (bUseTempBuffer != FALSE) { TRACE("RQueryServiceConfig2W() returns ERROR_INSUFFICIENT_BUFFER\n"); *pcbBytesNeeded = dwBufferSize; diff --git a/reactos/dll/win32/advapi32/service/sctrl.c b/reactos/dll/win32/advapi32/service/sctrl.c index cd4112140ed..4a0ae5665d9 100644 --- a/reactos/dll/win32/advapi32/service/sctrl.c +++ b/reactos/dll/win32/advapi32/service/sctrl.c @@ -440,7 +440,7 @@ ScStartService(PACTIVE_SERVICE lpService, lpService->hServiceStatus = ControlPacket->hServiceStatus; /* Build the arguments vector */ - if (lpService->bUnicode == TRUE) + if (lpService->bUnicode != FALSE) { ThreadParamsW = HeapAlloc(GetProcessHeap(), 0, sizeof(*ThreadParamsW)); if (ThreadParamsW == NULL) diff --git a/reactos/dll/win32/kernel32/client/appcache.c b/reactos/dll/win32/kernel32/client/appcache.c index cd49ebe9945..302984ae99c 100644 --- a/reactos/dll/win32/kernel32/client/appcache.c +++ b/reactos/dll/win32/kernel32/client/appcache.c @@ -73,7 +73,7 @@ IsShimInfrastructureDisabled(VOID) if ((NT_SUCCESS(Status)) && (KeyInfo.Type == REG_DWORD) && (KeyInfo.DataLength == sizeof(ULONG)) && - (KeyInfo.Data[0] == TRUE)) + (KeyInfo.Data[0] != FALSE)) { /* It is, so disable shims! */ DisableShims = TRUE; diff --git a/reactos/dll/win32/kernel32/client/console/init.c b/reactos/dll/win32/kernel32/client/console/init.c index 5fe81397bf4..3186bf4e71f 100644 --- a/reactos/dll/win32/kernel32/client/console/init.c +++ b/reactos/dll/win32/kernel32/client/console/init.c @@ -354,7 +354,7 @@ ConDllInitialize(IN ULONG Reason, else if (Reason == DLL_PROCESS_DETACH) { /* Free our resources */ - if (ConsoleInitialized == TRUE) + if (ConsoleInitialized != FALSE) { ConsoleInitialized = FALSE; RtlDeleteCriticalSection(&ConsoleLock); diff --git a/reactos/dll/win32/kernel32/client/dllmain.c b/reactos/dll/win32/kernel32/client/dllmain.c index 7d90867c42f..5c4ad135550 100644 --- a/reactos/dll/win32/kernel32/client/dllmain.c +++ b/reactos/dll/win32/kernel32/client/dllmain.c @@ -219,7 +219,7 @@ DllMain(HANDLE hDll, case DLL_PROCESS_DETACH: { - if (DllInitialized == TRUE) + if (DllInitialized != FALSE) { /* Uninitialize console support */ ConDllInitialize(dwReason, NULL); diff --git a/reactos/dll/win32/kernel32/client/power.c b/reactos/dll/win32/kernel32/client/power.c index 6bcf4732e2f..542e4f73759 100644 --- a/reactos/dll/win32/kernel32/client/power.c +++ b/reactos/dll/win32/kernel32/client/power.c @@ -89,7 +89,7 @@ SetSystemPowerState(IN BOOL fSuspend, Status = NtInitiatePowerAction((fSuspend != FALSE) ? PowerActionSleep : PowerActionHibernate, (fSuspend != FALSE) ? PowerSystemSleeping1 : PowerSystemHibernate, - fForce != TRUE, + (fForce == FALSE), FALSE); if (!NT_SUCCESS(Status)) { diff --git a/reactos/dll/win32/kernel32/client/proc.c b/reactos/dll/win32/kernel32/client/proc.c index 2047cca3c99..3caf28e3c35 100644 --- a/reactos/dll/win32/kernel32/client/proc.c +++ b/reactos/dll/win32/kernel32/client/proc.c @@ -1225,7 +1225,7 @@ GetExitCodeProcess(IN HANDLE hProcess, 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) != FALSE) return TRUE; /* Not a VDM process, fail the call */ BaseSetLastNTError(Status); diff --git a/reactos/dll/win32/lsasrv/authport.c b/reactos/dll/win32/lsasrv/authport.c index 3ce57d519b3..04759696427 100644 --- a/reactos/dll/win32/lsasrv/authport.c +++ b/reactos/dll/win32/lsasrv/authport.c @@ -97,7 +97,7 @@ LsapHandlePortConnection(PLSA_API_MSG RequestMsg) TRACE("Logon Process Name: %s\n", RequestMsg->ConnectInfo.LogonProcessNameBuffer); - if (RequestMsg->ConnectInfo.CreateContext == TRUE) + if (RequestMsg->ConnectInfo.CreateContext != FALSE) { Status = LsapCheckLogonProcess(RequestMsg, &LogonContext); @@ -129,7 +129,7 @@ LsapHandlePortConnection(PLSA_API_MSG RequestMsg) return Status; } - if (Accept == TRUE) + if (Accept != FALSE) { if (LogonContext != NULL) { diff --git a/reactos/dll/win32/lsasrv/lsarpc.c b/reactos/dll/win32/lsasrv/lsarpc.c index 28b28bbfd7b..4b9ef392c27 100644 --- a/reactos/dll/win32/lsasrv/lsarpc.c +++ b/reactos/dll/win32/lsasrv/lsarpc.c @@ -1642,8 +1642,8 @@ NTSTATUS WINAPI LsarRemovePrivilegesFromAccount( AccountHandle, AllPrivileges, Privileges); /* */ - if ((AllPrivileges == FALSE && Privileges == NULL) || - (AllPrivileges == TRUE && Privileges != NULL)) + if (((AllPrivileges == FALSE) && (Privileges == NULL)) || + ((AllPrivileges != FALSE) && (Privileges != NULL))) return STATUS_INVALID_PARAMETER; /* Validate the AccountHandle */ @@ -1657,7 +1657,7 @@ NTSTATUS WINAPI LsarRemovePrivilegesFromAccount( return Status; } - if (AllPrivileges == TRUE) + if (AllPrivileges != FALSE) { /* Delete the Privilgs attribute */ Status = LsapDeleteObjectAttribute(AccountObject, diff --git a/reactos/dll/win32/lsasrv/privileges.c b/reactos/dll/win32/lsasrv/privileges.c index f880b0c3d31..bb2b36f883f 100644 --- a/reactos/dll/win32/lsasrv/privileges.c +++ b/reactos/dll/win32/lsasrv/privileges.c @@ -332,7 +332,7 @@ done: } } - if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE)) + if ((Status == STATUS_SUCCESS) && (MoreEntries != FALSE)) Status = STATUS_MORE_ENTRIES; return Status; diff --git a/reactos/dll/win32/msports/classinst.c b/reactos/dll/win32/msports/classinst.c index b026581bcfc..a1df8ed92be 100644 --- a/reactos/dll/win32/msports/classinst.c +++ b/reactos/dll/win32/msports/classinst.c @@ -91,7 +91,7 @@ done: if (hDeviceKey) RegCloseKey(hDeviceKey); - if (ret == TRUE) + if (ret != FALSE) *ppResourceList = (PCM_RESOURCE_LIST)lpBuffer; return ret; diff --git a/reactos/dll/win32/msv1_0/msv1_0.c b/reactos/dll/win32/msv1_0/msv1_0.c index 63d03e78e18..624ea2b417e 100644 --- a/reactos/dll/win32/msv1_0/msv1_0.c +++ b/reactos/dll/win32/msv1_0/msv1_0.c @@ -1223,7 +1223,7 @@ done: if (!NT_SUCCESS(Status)) { - if (SessionCreated == TRUE) + if (SessionCreated != FALSE) DispatchTable.DeleteLogonSession(LogonId); if (*ProfileBuffer != NULL) diff --git a/reactos/dll/win32/netapi32/user.c b/reactos/dll/win32/netapi32/user.c index 60577727681..270ea070a17 100644 --- a/reactos/dll/win32/netapi32/user.c +++ b/reactos/dll/win32/netapi32/user.c @@ -2482,7 +2482,7 @@ NetUserEnum(LPCWSTR servername, if (EnumContext->Index >= EnumContext->Count) { -// if (EnumContext->BuiltinDone == TRUE) +// if (EnumContext->BuiltinDone != FALSE) // { // ApiStatus = NERR_Success; // goto done; diff --git a/reactos/dll/win32/samsrv/samrpc.c b/reactos/dll/win32/samsrv/samrpc.c index 74b98f746e8..44e401b3103 100644 --- a/reactos/dll/win32/samsrv/samrpc.c +++ b/reactos/dll/win32/samsrv/samrpc.c @@ -2393,7 +2393,7 @@ done: SampRegCloseKey(&NamesKeyHandle); SampRegCloseKey(&GroupsKeyHandle); - if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE)) + if ((Status == STATUS_SUCCESS) && (MoreEntries != FALSE)) Status = STATUS_MORE_ENTRIES; RtlReleaseResource(&SampResource); @@ -3004,7 +3004,7 @@ done: SampRegCloseKey(&NamesKeyHandle); SampRegCloseKey(&UsersKeyHandle); - if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE)) + if ((Status == STATUS_SUCCESS) && (MoreEntries != FALSE)) Status = STATUS_MORE_ENTRIES; RtlReleaseResource(&SampResource); @@ -3385,7 +3385,7 @@ done: SampRegCloseKey(&NamesKeyHandle); SampRegCloseKey(&AliasesKeyHandle); - if ((Status == STATUS_SUCCESS) && (MoreEntries == TRUE)) + if ((Status == STATUS_SUCCESS) && (MoreEntries != FALSE)) Status = STATUS_MORE_ENTRIES; RtlReleaseResource(&SampResource); @@ -7976,7 +7976,7 @@ SampSetUserAll(PSAM_DB_OBJECT UserObject, Buffer->All.SecurityDescriptor.Length); } - if (WriteFixedData == TRUE) + if (WriteFixedData != FALSE) { Status = SampSetObjectAttribute(UserObject, L"F", diff --git a/reactos/dll/win32/samsrv/setup.c b/reactos/dll/win32/samsrv/setup.c index 5694e9eb445..43f224d248a 100644 --- a/reactos/dll/win32/samsrv/setup.c +++ b/reactos/dll/win32/samsrv/setup.c @@ -762,7 +762,7 @@ SampSetupCreateDomain(IN HANDLE hServerKey, goto done; /* Create the server SD */ - if (bBuiltinDomain == TRUE) + if (bBuiltinDomain != FALSE) Status = SampCreateBuiltinDomainSD(&Sd, &SdSize); else diff --git a/reactos/dll/win32/serialui/serialui.c b/reactos/dll/win32/serialui/serialui.c index 6c0edebad0e..e4d4d50e17f 100644 --- a/reactos/dll/win32/serialui/serialui.c +++ b/reactos/dll/win32/serialui/serialui.c @@ -309,7 +309,7 @@ LRESULT CommDlgProc(HWND hDlg, { SendMessageW(hBox, CB_INSERTSTRING, 1, (LPARAM)wstr); if(lpDlgInfo->lpCC->dcb.fRtsControl == RTS_CONTROL_HANDSHAKE - || lpDlgInfo->lpCC->dcb.fOutxCtsFlow == TRUE) + || lpDlgInfo->lpCC->dcb.fOutxCtsFlow != FALSE) { SendMessageW(hBox, CB_SETCURSEL, 1, 0); lpDlgInfo->InitialFlowIndex = 1; diff --git a/reactos/dll/win32/shimgvw/shimgvw.c b/reactos/dll/win32/shimgvw/shimgvw.c index 143de71b9be..44bbf7cb0e4 100644 --- a/reactos/dll/win32/shimgvw/shimgvw.c +++ b/reactos/dll/win32/shimgvw/shimgvw.c @@ -142,7 +142,7 @@ static void pSaveImageAs(HWND hwnd) c++; sizeRemain -= sizeof(*c); - if (IsEqualGUID(&rawFormat, &codecInfo[j].FormatID) == TRUE) + if (IsEqualGUID(&rawFormat, &codecInfo[j].FormatID) != FALSE) { sfn.nFilterIndex = j + 1; } diff --git a/reactos/dll/win32/shlwapi/path.c b/reactos/dll/win32/shlwapi/path.c index 0aafbd7545e..4d3c5cf1521 100644 --- a/reactos/dll/win32/shlwapi/path.c +++ b/reactos/dll/win32/shlwapi/path.c @@ -1643,7 +1643,7 @@ BOOL WINAPI PathIsRootW(LPCWSTR lpszPath) * 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\\") != FALSE) *| ... * * will always fail. diff --git a/reactos/dll/win32/uxtheme/system.c b/reactos/dll/win32/uxtheme/system.c index 1b3f8c664c0..64963771115 100644 --- a/reactos/dll/win32/uxtheme/system.c +++ b/reactos/dll/win32/uxtheme/system.c @@ -192,7 +192,7 @@ void UXTHEME_LoadTheme(BOOL bLoad) WCHAR szCurrentSize[64]; BOOL bThemeActive = FALSE; - if(bLoad == TRUE && g_bThemeHooksActive) + if ((bLoad != FALSE) && g_bThemeHooksActive) { /* Get current theme configuration */ if(!RegOpenKeyW(HKEY_CURRENT_USER, szThemeManager, &hKey)) { diff --git a/reactos/dll/win32/uxtheme/themehooks.c b/reactos/dll/win32/uxtheme/themehooks.c index f1dd07997bf..43620d8ff3e 100644 --- a/reactos/dll/win32/uxtheme/themehooks.c +++ b/reactos/dll/win32/uxtheme/themehooks.c @@ -235,11 +235,11 @@ int OnPostWinPosChanged(HWND hWnd, WINDOWPOS* pWinPos) return 0; /* We don't touch the shape of the window if the application sets it on its own */ - if (pwndData->HasAppDefinedRgn == TRUE) + if (pwndData->HasAppDefinedRgn != FALSE) return 0; /* Calling SetWindowRgn will call SetWindowPos again so we need to avoid this recursion */ - if (pwndData->UpdatingRgn == TRUE) + if (pwndData->UpdatingRgn != FALSE) return 0; if(!IsAppThemed() || !(GetThemeAppProperties() & STAP_ALLOW_NONCLIENT)) diff --git a/reactos/dll/win32/wshtcpip/wshtcpip.c b/reactos/dll/win32/wshtcpip/wshtcpip.c index f00fc3eac1b..22e27efe24d 100644 --- a/reactos/dll/win32/wshtcpip/wshtcpip.c +++ b/reactos/dll/win32/wshtcpip/wshtcpip.c @@ -399,27 +399,27 @@ SendRequest( IN DWORD RequestSize, IN DWORD IOCTL) { - BOOLEAN Status; + BOOLEAN Success; HANDLE TcpCC; DWORD BytesReturned; if (openTcpFile(&TcpCC, FILE_READ_DATA | FILE_WRITE_DATA) != STATUS_SUCCESS) return WSAEINVAL; - Status = DeviceIoControl(TcpCC, - IOCTL, - Request, - RequestSize, - NULL, - 0, - &BytesReturned, - NULL); + Success = DeviceIoControl(TcpCC, + IOCTL, + Request, + RequestSize, + NULL, + 0, + &BytesReturned, + NULL); closeTcpFile(TcpCC); - DPRINT("DeviceIoControl: %ld\n", ((Status == TRUE) ? 0 : GetLastError())); + DPRINT("DeviceIoControl: %ld\n", ((Success != FALSE) ? 0 : GetLastError())); - if (!Status) + if (!Success) return WSAEINVAL; return NO_ERROR; diff --git a/reactos/drivers/bus/acpi/pnp.c b/reactos/drivers/bus/acpi/pnp.c index 4216ea497be..3b867e0ee47 100644 --- a/reactos/drivers/bus/acpi/pnp.c +++ b/reactos/drivers/bus/acpi/pnp.c @@ -379,7 +379,7 @@ Bus_CompletionRoutine( // 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 != FALSE) { KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE); } diff --git a/reactos/drivers/filesystems/cdfs/dirctl.c b/reactos/drivers/filesystems/cdfs/dirctl.c index f49bd040c09..c3d2878007b 100644 --- a/reactos/drivers/filesystems/cdfs/dirctl.c +++ b/reactos/drivers/filesystems/cdfs/dirctl.c @@ -189,7 +189,7 @@ CdfsFindFile(PDEVICE_EXTENSION DeviceExt, IsRoot = TRUE; } - if (IsRoot == TRUE) + if (IsRoot != FALSE) { StreamOffset.QuadPart = (LONGLONG)DeviceExt->CdInfo.RootStart * (LONGLONG)BLOCKSIZE; DirSize = DeviceExt->CdInfo.RootSize; diff --git a/reactos/drivers/ksfilter/ks/misc.c b/reactos/drivers/ksfilter/ks/misc.c index 4c814d7285a..f0ce95e909c 100644 --- a/reactos/drivers/ksfilter/ks/misc.c +++ b/reactos/drivers/ksfilter/ks/misc.c @@ -53,7 +53,7 @@ KspForwardIrpSynchronousCompletion( IN PIRP Irp, IN PVOID Context) { - if (Irp->PendingReturned == TRUE) + if (Irp->PendingReturned != FALSE) { KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE); } diff --git a/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.c b/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.c index a601375fef3..815cf9f8ec4 100644 --- a/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.c +++ b/reactos/drivers/multimedia/audio/mpu401_nt4/mpu401.c @@ -328,7 +328,7 @@ MPU401DeviceControl(PDEVICE_OBJECT DeviceObject, } else if (BeepParam->Duration == (DWORD)-1) { - if (DeviceExtension->BeepOn == TRUE) + if (DeviceExtension->BeepOn != FALSE) { HalMakeBeep(0); DeviceExtension->BeepOn = FALSE; diff --git a/reactos/drivers/multimedia/audio/sndblst.old/sndblst.c b/reactos/drivers/multimedia/audio/sndblst.old/sndblst.c index 7b78e52a0a7..6fea7cac726 100644 --- a/reactos/drivers/multimedia/audio/sndblst.old/sndblst.c +++ b/reactos/drivers/multimedia/audio/sndblst.old/sndblst.c @@ -387,7 +387,7 @@ BlasterDeviceControl(PDEVICE_OBJECT DeviceObject, } else if (BeepParam->Duration == (DWORD)-1) { - if (DeviceExtension->BeepOn == TRUE) + if (DeviceExtension->BeepOn != FALSE) { HalMakeBeep(0); DeviceExtension->BeepOn = FALSE; diff --git a/reactos/drivers/storage/class/disk_new/disk.c b/reactos/drivers/storage/class/disk_new/disk.c index 1e30a47e3f2..3e3ec30f74f 100644 --- a/reactos/drivers/storage/class/disk_new/disk.c +++ b/reactos/drivers/storage/class/disk_new/disk.c @@ -720,7 +720,7 @@ Return Value: ASSERT( status != STATUS_INSUFFICIENT_RESOURCES ); - } else if((commonExtension->IsFdo == TRUE) && (residualBytes == 0)) { + } else if ((commonExtension->IsFdo != FALSE) && (residualBytes == 0)) { // // This failed because we think the physical disk is too small. @@ -3641,7 +3641,7 @@ DisableWriteCache( status = DiskGetCacheInformation(fdoExtension, &cacheInfo); - if (NT_SUCCESS(status) && (cacheInfo.WriteCacheEnabled == TRUE)) { + if (NT_SUCCESS(status) && (cacheInfo.WriteCacheEnabled != FALSE)) { cacheInfo.WriteCacheEnabled = FALSE; @@ -4797,7 +4797,7 @@ DiskFindContainingPartition( // // Determine the search direction and setup the loop // - if(SearchTopToBottom == TRUE) { + if(SearchTopToBottom != FALSE) { startIndex = 0; stopIndex = LayoutInfo->PartitionCount; diff --git a/reactos/drivers/storage/class/disk_new/part.c b/reactos/drivers/storage/class/disk_new/part.c index a49597e1250..910bb863c4e 100644 --- a/reactos/drivers/storage/class/disk_new/part.c +++ b/reactos/drivers/storage/class/disk_new/part.c @@ -93,7 +93,7 @@ Return Value: // If the cached partition table is present then return a copy of it. // - if(diskData->CachedPartitionTableValid == TRUE) { + if (diskData->CachedPartitionTableValid != FALSE) { ULONG partitionNumber; PDRIVE_LAYOUT_INFORMATION_EX layout = diskData->CachedPartitionTable; diff --git a/reactos/drivers/storage/class/disk_new/pnp.c b/reactos/drivers/storage/class/disk_new/pnp.c index 8065feeb292..84f7f0f55c0 100644 --- a/reactos/drivers/storage/class/disk_new/pnp.c +++ b/reactos/drivers/storage/class/disk_new/pnp.c @@ -1314,7 +1314,7 @@ Return Value: if (NT_SUCCESS(status)) { - if (cacheInfo.WriteCacheEnabled == TRUE) + if (cacheInfo.WriteCacheEnabled != FALSE) { if (writeCacheOverride == DiskWriteCacheDisable) { diff --git a/reactos/drivers/storage/classpnp/autorun.c b/reactos/drivers/storage/classpnp/autorun.c index 4716a31634d..ab5ff0da616 100644 --- a/reactos/drivers/storage/classpnp/autorun.c +++ b/reactos/drivers/storage/classpnp/autorun.c @@ -750,7 +750,7 @@ ClasspSetMediaChangeStateEx( Executive, KernelMode, FALSE, - ((Wait == TRUE) ? NULL : &zero)); + ((Wait != FALSE) ? NULL : &zero)); if(status == STATUS_TIMEOUT) { @@ -1757,7 +1757,7 @@ ClasspInitializeGesn( adapterDescriptor = FdoExtension->AdapterDescriptor; atapiResets = 0; retryImmediately = TRUE; - for (i = 0; i < 16 && retryImmediately == TRUE; i++) { + for (i = 0; (i < 16) && (retryImmediately != FALSE); i++) { irp = ClasspPrepareMcnIrp(FdoExtension, Info, TRUE); if (irp == NULL) { diff --git a/reactos/drivers/storage/classpnp/class.c b/reactos/drivers/storage/classpnp/class.c index da6603ede97..f89fa32d233 100644 --- a/reactos/drivers/storage/classpnp/class.c +++ b/reactos/drivers/storage/classpnp/class.c @@ -317,7 +317,7 @@ ClassInitialize( DriverObject->DriverStartIo = ClasspStartIo; } - if ((InitializationData->ClassUnload) && (ClassPnpAllowUnload == TRUE)) { + if ((InitializationData->ClassUnload) && (ClassPnpAllowUnload != FALSE)) { DriverObject->DriverUnload = ClassUnload; } else { DriverObject->DriverUnload = NULL; @@ -1061,7 +1061,7 @@ ClassDispatchPnp( // cleanup the changes done above // - if (setPagable == TRUE) { + if (setPagable != FALSE) { DebugPrint((2, "ClassDispatchPnp (%p,%p): Unsetting " "PAGABLE bit due to irp failure\n", DeviceObject, Irp)); diff --git a/reactos/drivers/storage/classpnp/obsolete.c b/reactos/drivers/storage/classpnp/obsolete.c index 498507ae3ff..98710093d39 100644 --- a/reactos/drivers/storage/classpnp/obsolete.c +++ b/reactos/drivers/storage/classpnp/obsolete.c @@ -813,7 +813,7 @@ Return Value: // current position then insert this entry into the current sweep. // - if((LowPriority != TRUE) && (BlockNumber > List->BlockNumber)) { + if ((LowPriority == FALSE) && (BlockNumber > List->BlockNumber)) { ClasspInsertCScanList(&(List->CurrentSweep), entry); } else { ClasspInsertCScanList(&(List->NextSweep), entry); diff --git a/reactos/drivers/storage/classpnp/power.c b/reactos/drivers/storage/classpnp/power.c index 085abc386c0..e1b5b32b422 100644 --- a/reactos/drivers/storage/classpnp/power.c +++ b/reactos/drivers/storage/classpnp/power.c @@ -189,7 +189,7 @@ ClasspPowerUpCompletion( // request unless we can ignore failed locks // - if((context->Options.LockQueue == TRUE) && + if ((context->Options.LockQueue != FALSE) && (!NT_SUCCESS(Irp->IoStatus.Status))) { DebugPrint((1, "(%p)\tIrp status was %lx\n", @@ -359,7 +359,7 @@ ClasspPowerUpCompletion( &status, &context->RetryInterval); - if((retry == TRUE) && (context->RetryCount-- != 0)) { + if ((retry != FALSE) && (context->RetryCount-- != 0)) { DebugPrint((1, "(%p)\tRetrying failed request\n", Irp)); @@ -554,7 +554,7 @@ ClasspPowerDownCompletion( DebugPrint((1, "(%p)\tPreviously sent power lock\n", Irp)); - if((context->Options.LockQueue == TRUE) && + if ((context->Options.LockQueue != FALSE) && (!NT_SUCCESS(Irp->IoStatus.Status))) { DebugPrint((1, "(%p)\tIrp status was %lx\n", @@ -703,7 +703,7 @@ ClasspPowerDownCompletion( &status, &context->RetryInterval); - if((retry == TRUE) && (context->RetryCount-- != 0)) { + if ((retry != FALSE) && (context->RetryCount-- != 0)) { DebugPrint((1, "(%p)\tRetrying failed request\n", Irp)); @@ -808,7 +808,7 @@ ClasspPowerDownCompletion( &status, &context->RetryInterval); - if((retry == TRUE) && (context->RetryCount-- != 0)) { + if ((retry != FALSE) && (context->RetryCount-- != 0)) { DebugPrint((1, "(%p)\tRetrying failed request\n", Irp)); diff --git a/reactos/drivers/storage/ide/atapi/atapi.c b/reactos/drivers/storage/ide/atapi/atapi.c index 6bad4808055..94807c66ca9 100644 --- a/reactos/drivers/storage/ide/atapi/atapi.c +++ b/reactos/drivers/storage/ide/atapi/atapi.c @@ -2824,7 +2824,7 @@ Return Value: } } - if (*Again == TRUE) { + if (*Again != FALSE) { for (channel = 0; channel < 2; channel++) { @@ -5675,7 +5675,7 @@ HwDeviceExtension - ATAPI driver storage. UCHAR statusByte,errorByte; - if (EnableMSN == TRUE){ + if (EnableMSN != FALSE){ // // If supported enable Media Status Notification support @@ -5710,7 +5710,7 @@ HwDeviceExtension - ATAPI driver storage. } } - } else { // end if EnableMSN == TRUE + } else { // end if EnableMSN != FALSE // // disable if previously enabled diff --git a/reactos/drivers/storage/ide/uniata/id_ata.cpp b/reactos/drivers/storage/ide/uniata/id_ata.cpp index 799b2d0ef59..f823e4f6364 100644 --- a/reactos/drivers/storage/ide/uniata/id_ata.cpp +++ b/reactos/drivers/storage/ide/uniata/id_ata.cpp @@ -8712,7 +8712,7 @@ invalid_cdb: statusByte = WaitOnBaseBusy(chan); //SelectDrive(chan, DeviceNumber); - if (cdb->MEDIA_REMOVAL.Prevent == TRUE) { + if (cdb->MEDIA_REMOVAL.Prevent != FALSE) { //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 { @@ -9002,7 +9002,7 @@ IdeMediaStatus( chan = &(deviceExtension->chan[lChannel]); SelectDrive(chan, DeviceNumber); - if (EnableMSN == TRUE){ + if (EnableMSN != FALSE){ // If supported enable Media Status Notification support if ((chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_REMOVABLE_DRIVE)) { @@ -9028,7 +9028,7 @@ IdeMediaStatus( } } - } else { // end if EnableMSN == TRUE + } else { // end if EnableMSN != FALSE // disable if previously enabled if ((chan->lun[DeviceNumber]->DeviceFlags & DFLAGS_MEDIA_STATUS_ENABLED)) { diff --git a/reactos/drivers/usb/usbohci/usb_request.cpp b/reactos/drivers/usb/usbohci/usb_request.cpp index 5262d0aa05b..c56795731de 100644 --- a/reactos/drivers/usb/usbohci/usb_request.cpp +++ b/reactos/drivers/usb/usbohci/usb_request.cpp @@ -1509,7 +1509,7 @@ CUSBRequest::BuildControlTransferDescriptor( // // setup pid direction // - DataDescriptor->Flags |= InternalGetPidDirection() == TRUE ? OHCI_TD_DIRECTION_PID_IN : OHCI_TD_DIRECTION_PID_OUT; + DataDescriptor->Flags |= (InternalGetPidDirection() != FALSE) ? OHCI_TD_DIRECTION_PID_IN : OHCI_TD_DIRECTION_PID_OUT; // // use short packets @@ -1525,7 +1525,7 @@ CUSBRequest::BuildControlTransferDescriptor( // // flip status pid direction // - StatusDescriptor->Flags |= InternalGetPidDirection() == TRUE ? OHCI_TD_DIRECTION_PID_OUT : OHCI_TD_DIRECTION_PID_IN; + StatusDescriptor->Flags |= (InternalGetPidDirection() != FALSE) ? OHCI_TD_DIRECTION_PID_OUT : OHCI_TD_DIRECTION_PID_IN; // // link setup descriptor to data descriptor diff --git a/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp b/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp index 8e7b8ab9dd4..aab59ca31fc 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/irp.cpp @@ -504,7 +504,7 @@ CompletionRoutine( IN PIRP Irp, IN PVOID Context) { - if (Irp->PendingReturned == TRUE) + if (Irp->PendingReturned != FALSE) { KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE); } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp b/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp index 1ffeb4597d5..b435bf56c17 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp @@ -640,7 +640,8 @@ CIrpQueue::ReleaseMappingWithTag( 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 != FALSE)) { // mark mapping as released StreamData->Tags[Index].Tag = NULL; @@ -678,8 +679,8 @@ CIrpQueue::ReleaseMappingWithTag( // check if the released mapping is one of these for(Index = 0; Index < StreamData->StreamHeaderCount; Index++) { - if (StreamData->Tags[Index].Tag == Tag && - StreamData->Tags[Index].Used == TRUE) + if ((StreamData->Tags[Index].Tag == Tag) && + (StreamData->Tags[Index].Used != FALSE)) { // mark mapping as released StreamData->Tags[Index].Tag = NULL; diff --git a/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp b/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp index fbdd6667978..c9f86c34271 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp @@ -646,7 +646,7 @@ CPortPinWaveCyclic::GeneratePositionEvents( // get event entry context Context = (PLOOPEDSTREAMING_EVENT_CONTEXT)(EventEntry + 1); - if (Context->bLoopedStreaming == TRUE) + if (Context->bLoopedStreaming != FALSE) { if (NewOffset > OldOffset) { diff --git a/reactos/drivers/wdm/audio/legacy/stream/helper.c b/reactos/drivers/wdm/audio/legacy/stream/helper.c index 9353ae90b39..6d2a844dc7f 100644 --- a/reactos/drivers/wdm/audio/legacy/stream/helper.c +++ b/reactos/drivers/wdm/audio/legacy/stream/helper.c @@ -16,7 +16,7 @@ CompletionRoutine( IN PIRP Irp, IN PVOID Context) { - if (Irp->PendingReturned == TRUE) + if (Irp->PendingReturned != FALSE) { KeSetEvent ((PKEVENT) Context, IO_NO_INCREMENT, FALSE); } diff --git a/reactos/hal/halppc/generic/bus.c b/reactos/hal/halppc/generic/bus.c index 9d2091aed9e..23a9a07c8a4 100644 --- a/reactos/hal/halppc/generic/bus.c +++ b/reactos/hal/halppc/generic/bus.c @@ -105,7 +105,7 @@ HalpFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress, 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 != 0) && (NextBus != FALSE)) return FALSE; /* Return bus data */ TranslatedAddress->QuadPart = BusAddress.QuadPart; diff --git a/reactos/hal/halppc/generic/display.c b/reactos/hal/halppc/generic/display.c index bfea0333423..846a37a1145 100644 --- a/reactos/hal/halppc/generic/display.c +++ b/reactos/hal/halppc/generic/display.c @@ -257,7 +257,7 @@ HalReleaseDisplayOwnership(VOID) if (HalResetDisplayParameters == NULL) return; - if (HalOwnsDisplay == TRUE) + if (HalOwnsDisplay != FALSE) return; HalOwnsDisplay = TRUE; diff --git a/reactos/hal/halx86/acpi/busemul.c b/reactos/hal/halx86/acpi/busemul.c index 71b2aef3d85..17697a4d3b5 100644 --- a/reactos/hal/halx86/acpi/busemul.c +++ b/reactos/hal/halx86/acpi/busemul.c @@ -105,7 +105,7 @@ HalpFindBusAddressTranslation(IN PHYSICAL_ADDRESS BusAddress, 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 != 0) && (NextBus != FALSE)) return FALSE; /* Return bus data */ TranslatedAddress->QuadPart = BusAddress.QuadPart;