summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Service.c2
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index 60080f13f7..dd0ff7e2c5 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -161,7 +161,7 @@ GetWorker (
break;
case PCD_TYPE_STRING:
- StringTableIdx = (UINT16) *((UINT8 *) PcdDb + Offset);
+ StringTableIdx = *(UINT16*)((UINT8 *) PcdDb + Offset);
RetPtr = (VOID *) (StringTable + StringTableIdx);
break;
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c
index ff59b81dcd..200c0d4639 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.c
@@ -640,7 +640,7 @@ GetWorker (
return (VOID *) ((UINT8 *)PeiPcdDb + Offset);
case PCD_TYPE_STRING:
- StringTableIdx = (UINT16) *((UINT8 *) PeiPcdDb + Offset);
+ StringTableIdx = * (UINT16*) ((UINT8 *) PeiPcdDb + Offset);
return (VOID *) (&StringTable[StringTableIdx]);
default: