From 3d53ba8b4506647f28adb2acb09923c539bf3ad3 Mon Sep 17 00:00:00 2001 From: klu2 Date: Wed, 25 Feb 2009 08:11:42 +0000 Subject: [PATCH] Merge GetSizeTableIndexA to GetSizeTableIndex function because it only be invoked by GetSizeTableIndex. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7675 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/PCD/Dxe/Service.c | 62 +++++++----------------- 1 file changed, 18 insertions(+), 44 deletions(-) diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index 64bbe4c799..9c497e9606 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -1128,33 +1128,36 @@ GetSkuIdArray ( } - /** - Get index of PCD entry in size table. - + Wrapper function of getting index of PCD entry in size table. + @param LocalTokenNumberTableIdx Index of this PCD in local token number table. - @param LocalTokenNumberTable Pointer to local token number table in PCD database. @param IsPeiDb If TRUE, the pcd entry is initialized in PEI phase, If FALSE, the pcd entry is initialized in DXE phase. @return index of PCD entry in size table. - **/ UINTN -GetSizeTableIndexA ( - IN UINTN LocalTokenNumberTableIdx, - IN UINT32 *LocalTokenNumberTable, - IN BOOLEAN IsPeiDb +GetSizeTableIndex ( + IN UINTN LocalTokenNumberTableIdx, + IN BOOLEAN IsPeiDb ) { - UINTN Index; - UINTN SizeTableIdx; - UINTN LocalTokenNumber; - SKU_ID *SkuIdTable; + UINT32 *LocalTokenNumberTable; + UINTN LocalTokenNumber; + UINTN Index; + UINTN SizeTableIdx; + SKU_ID *SkuIdTable; + if (IsPeiDb) { + LocalTokenNumberTable = mPcdDatabase->PeiDb.Init.LocalTokenNumberTable; + } else { + LocalTokenNumberTable = mPcdDatabase->DxeDb.Init.LocalTokenNumberTable; + } + SizeTableIdx = 0; - for (Index=0; IndexPeiDb.Init.LocalTokenNumberTable; - } else { - LocalTokenNumberTable = mPcdDatabase->DxeDb.Init.LocalTokenNumberTable; - } - return GetSizeTableIndexA (LocalTokenNumberTableIdx, - LocalTokenNumberTable, - IsPeiDb); + return SizeTableIdx; } /**