diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-24 08:41:14 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-24 08:41:14 +0000 |
commit | 7ec9caab9293a06129cdeceda40db94f0b37eb9e (patch) | |
tree | 7bd545bd344eb22f1aac19e6ed97776e0b570d85 /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint | |
parent | 9260b9151b0f6c08727dcccc03c1ce58d1d623fd (diff) | |
download | edk2-platforms-7ec9caab9293a06129cdeceda40db94f0b37eb9e.tar.xz |
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
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c | 2 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c index aaa64c9458..f575592dbc 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c @@ -337,7 +337,7 @@ EfiDevicePathInstanceCount ( UINTN Size;
Count = 0;
- while (GetNextDevicePathInstance (&DevicePath, &Size)) {
+ while (GetNextDevicePathInstance (&DevicePath, &Size) != NULL) {
Count += 1;
}
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c index e9caf5958a..7929f5cbfd 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c @@ -586,7 +586,7 @@ BOpt_FindFiles ( return EFI_NOT_FOUND;
}
- if (!(DirInfo->Attribute & EFI_FILE_DIRECTORY)) {
+ if ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0) {
return EFI_INVALID_PARAMETER;
}
@@ -614,8 +614,8 @@ BOpt_FindFiles ( break;
}
- if ((DirInfo->Attribute & EFI_FILE_DIRECTORY && Pass == 2) ||
- (!(DirInfo->Attribute & EFI_FILE_DIRECTORY) && Pass == 1)
+ if (((DirInfo->Attribute & EFI_FILE_DIRECTORY) != 0 && Pass == 2) ||
+ ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0 && Pass == 1)
) {
//
// Pass 1 is for Directories
@@ -624,7 +624,7 @@ BOpt_FindFiles ( 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
//
|