Fix the potential issue that using integrate as BOOLEAN value in judgment.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8648 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2009-06-24 08:41:14 +00:00
parent 9260b9151b
commit 7ec9caab92
5 changed files with 8 additions and 8 deletions

View File

@ -551,7 +551,7 @@ KbdControllerDriverStop (
// //
// Free other resources // Free other resources
// //
if ((ConsoleIn->ConIn).WaitForKey) { if ((ConsoleIn->ConIn).WaitForKey != NULL) {
gBS->CloseEvent ((ConsoleIn->ConIn).WaitForKey); gBS->CloseEvent ((ConsoleIn->ConIn).WaitForKey);
(ConsoleIn->ConIn).WaitForKey = NULL; (ConsoleIn->ConIn).WaitForKey = NULL;
} }

View File

@ -337,7 +337,7 @@ EfiDevicePathInstanceCount (
UINTN Size; UINTN Size;
Count = 0; Count = 0;
while (GetNextDevicePathInstance (&DevicePath, &Size)) { while (GetNextDevicePathInstance (&DevicePath, &Size) != NULL) {
Count += 1; Count += 1;
} }

View File

@ -586,7 +586,7 @@ BOpt_FindFiles (
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
if (!(DirInfo->Attribute & EFI_FILE_DIRECTORY)) { if ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -614,8 +614,8 @@ BOpt_FindFiles (
break; break;
} }
if ((DirInfo->Attribute & EFI_FILE_DIRECTORY && Pass == 2) || if (((DirInfo->Attribute & EFI_FILE_DIRECTORY) != 0 && Pass == 2) ||
(!(DirInfo->Attribute & EFI_FILE_DIRECTORY) && Pass == 1) ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0 && Pass == 1)
) { ) {
// //
// Pass 1 is for Directories // Pass 1 is for Directories
@ -624,7 +624,7 @@ BOpt_FindFiles (
continue; continue;
} }
if (!(BOpt_IsEfiImageName (DirInfo->FileName) || DirInfo->Attribute & EFI_FILE_DIRECTORY)) { if (!(BOpt_IsEfiImageName (DirInfo->FileName) || (DirInfo->Attribute & EFI_FILE_DIRECTORY) != 0)) {
// //
// Slip file unless it is a directory entry or a .EFI file // Slip file unless it is a directory entry or a .EFI file
// //

View File

@ -259,7 +259,7 @@ CallBootManager (
// //
// Don't display the boot option marked as LOAD_OPTION_HIDDEN // Don't display the boot option marked as LOAD_OPTION_HIDDEN
// //
if (Option->Attribute & LOAD_OPTION_HIDDEN) { if ((Option->Attribute & LOAD_OPTION_HIDDEN) != 0) {
continue; continue;
} }

View File

@ -349,7 +349,7 @@ HotkeyCallback (
HotkeyData = &Hotkey->KeyData[Hotkey->WaitingKey]; HotkeyData = &Hotkey->KeyData[Hotkey->WaitingKey];
if ((KeyData->Key.ScanCode == HotkeyData->Key.ScanCode) && if ((KeyData->Key.ScanCode == HotkeyData->Key.ScanCode) &&
(KeyData->Key.UnicodeChar == HotkeyData->Key.UnicodeChar) && (KeyData->Key.UnicodeChar == HotkeyData->Key.UnicodeChar) &&
((HotkeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) ? (KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE)) { (((HotkeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ? (KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE)) {
// //
// Receive an expecting key stroke // Receive an expecting key stroke
// //