MdeModulePkg Pcd: Refine the code to avoid error report.
authorStar Zeng <star.zeng@intel.com>
Mon, 2 Dec 2013 10:18:59 +0000 (10:18 +0000)
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 2 Dec 2013 10:18:59 +0000 (10:18 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14924 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/PCD/Dxe/Service.c
MdeModulePkg/Universal/PCD/Pei/Service.c

index a9c4c10..b082f0a 100644 (file)
@@ -98,7 +98,7 @@ GetPcdType (
     case PCD_DATUM_TYPE_POINTER:\r
       return EFI_PCD_TYPE_PTR;\r
     case PCD_DATUM_TYPE_UINT8:\r
-      if (LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) {\r
+      if ((LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) == PCD_DATUM_TYPE_UINT8_BOOLEAN) {\r
         return EFI_PCD_TYPE_BOOL;\r
       } else {\r
         return EFI_PCD_TYPE_8;\r
index a4e35c2..4fb8b4a 100644 (file)
@@ -72,7 +72,7 @@ GetPcdType (
     case PCD_DATUM_TYPE_POINTER:\r
       return EFI_PCD_TYPE_PTR;\r
     case PCD_DATUM_TYPE_UINT8:\r
-      if (LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) {\r
+      if ((LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) == PCD_DATUM_TYPE_UINT8_BOOLEAN) {\r
         return EFI_PCD_TYPE_BOOL;\r
       } else {\r
         return EFI_PCD_TYPE_8;\r