diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-02 07:03:06 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-02 07:03:06 +0000 |
commit | abc25afaa56783ec7f5d9c0fc90cadc5403928ab (patch) | |
tree | 11570d03962886f6508832330be1ed5b9b31fe71 /EdkModulePkg | |
parent | 3496595d7bafc329cae169f79c450253b32fadd8 (diff) | |
download | edk2-abc25afaa56783ec7f5d9c0fc90cadc5403928ab.zip edk2-abc25afaa56783ec7f5d9c0fc90cadc5403928ab.tar.gz edk2-abc25afaa56783ec7f5d9c0fc90cadc5403928ab.tar.bz2 |
Make the EdkMoudlePkg build by allocate mCallbackFnTable at runtime as PCD_TOTAL_TOKEN_NUMBER could be zero.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@390 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg')
-rw-r--r-- | EdkModulePkg/Universal/PCD/Dxe/Service.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/EdkModulePkg/Universal/PCD/Dxe/Service.c b/EdkModulePkg/Universal/PCD/Dxe/Service.c index bccd0a6..00437f1 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Service.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Service.c @@ -24,7 +24,7 @@ Module Name: Service.c PCD_DATABASE * mPcdDatabase;
-LIST_ENTRY mCallbackFnTable[PCD_TOTAL_TOKEN_NUMBER];
+LIST_ENTRY *mCallbackFnTable;
VOID *
GetWorker (
@@ -310,6 +310,11 @@ BuildPcdDxeDataBase ( //
// Initialized the Callback Function Table
//
+
+ if (PCD_TOTAL_TOKEN_NUMBER != 0) {
+ mCallbackFnTable = AllocateZeroPool (PCD_TOTAL_TOKEN_NUMBER);
+ }
+
for (Idx = 0; Idx < PCD_TOTAL_TOKEN_NUMBER; Idx++) {
InitializeListHead (&mCallbackFnTable[Idx]);
}
|