//\r
// Free other resources\r
//\r
- if ((ConsoleIn->ConIn).WaitForKey) {\r
+ if ((ConsoleIn->ConIn).WaitForKey != NULL) {\r
gBS->CloseEvent ((ConsoleIn->ConIn).WaitForKey);\r
(ConsoleIn->ConIn).WaitForKey = NULL;\r
}\r
UINTN Size;\r
\r
Count = 0;\r
- while (GetNextDevicePathInstance (&DevicePath, &Size)) {\r
+ while (GetNextDevicePathInstance (&DevicePath, &Size) != NULL) {\r
Count += 1;\r
}\r
\r
return EFI_NOT_FOUND;\r
}\r
\r
- if (!(DirInfo->Attribute & EFI_FILE_DIRECTORY)) {\r
+ if ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
break;\r
}\r
\r
- if ((DirInfo->Attribute & EFI_FILE_DIRECTORY && Pass == 2) ||\r
- (!(DirInfo->Attribute & EFI_FILE_DIRECTORY) && Pass == 1)\r
+ if (((DirInfo->Attribute & EFI_FILE_DIRECTORY) != 0 && Pass == 2) ||\r
+ ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0 && Pass == 1)\r
) {\r
//\r
// Pass 1 is for Directories\r
continue;\r
}\r
\r
- if (!(BOpt_IsEfiImageName (DirInfo->FileName) || DirInfo->Attribute & EFI_FILE_DIRECTORY)) {\r
+ if (!(BOpt_IsEfiImageName (DirInfo->FileName) || (DirInfo->Attribute & EFI_FILE_DIRECTORY) != 0)) {\r
//\r
// Slip file unless it is a directory entry or a .EFI file\r
//\r
//\r
// Don't display the boot option marked as LOAD_OPTION_HIDDEN\r
//\r
- if (Option->Attribute & LOAD_OPTION_HIDDEN) {\r
+ if ((Option->Attribute & LOAD_OPTION_HIDDEN) != 0) {\r
continue;\r
}\r
\r
HotkeyData = &Hotkey->KeyData[Hotkey->WaitingKey];\r
if ((KeyData->Key.ScanCode == HotkeyData->Key.ScanCode) &&\r
(KeyData->Key.UnicodeChar == HotkeyData->Key.UnicodeChar) &&\r
- ((HotkeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) ? (KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE)) {\r
+ (((HotkeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ? (KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE)) {\r
//\r
// Receive an expecting key stroke\r
//\r