]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the potential issue that using integrate as BOOLEAN value in judgment.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Jun 2009 08:41:14 +0000 (08:41 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Jun 2009 08:41:14 +0000 (08:41 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8648 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c

index 25aadfe481c38c5a3c78c89d3bfd51f786e32539..098d29f6e0597c3fa1995aeab6996e6f2ee2098d 100644 (file)
@@ -551,7 +551,7 @@ KbdControllerDriverStop (
   //\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
index aaa64c9458bb291160537c7fafc3ca8bcadc554e..f575592dbc713706d5413a77c4c91e55dac07168 100644 (file)
@@ -337,7 +337,7 @@ EfiDevicePathInstanceCount (
   UINTN Size;\r
 \r
   Count = 0;\r
-  while (GetNextDevicePathInstance (&DevicePath, &Size)) {\r
+  while (GetNextDevicePathInstance (&DevicePath, &Size) != NULL) {\r
     Count += 1;\r
   }\r
 \r
index e9caf5958a5f813fd62b0eeb8163099cb5f3a05d..7929f5cbfd4d56632e2362b71e7b6dbaf481e32a 100644 (file)
@@ -586,7 +586,7 @@ BOpt_FindFiles (
     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
@@ -614,8 +614,8 @@ BOpt_FindFiles (
         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
@@ -624,7 +624,7 @@ BOpt_FindFiles (
         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
index 7a727b86753d1e0b3173b084130b85c42b801ab5..0fad88ed482d6f539393f454e5308bd0d080a51e 100644 (file)
@@ -259,7 +259,7 @@ CallBootManager (
     //\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
index 72139a8b4da668fd2bfd91bc1ac3a3d1b40df55e..99c3306ec9985fcd4aa58f024a8b94a22a12fe7f 100644 (file)
@@ -349,7 +349,7 @@ HotkeyCallback (
     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