diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-22 00:52:53 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-22 00:52:53 +0000 |
commit | c46484952ad23fca742f8e6add49d78bda702d58 (patch) | |
tree | ec00b0ca402f7e620e4d01ff9bbf300f04548b25 /MdeModulePkg/Universal/HiiDatabaseDxe | |
parent | d777486198d8ec66e2f461a641d505f4063e1e5e (diff) | |
download | edk2-platforms-c46484952ad23fca742f8e6add49d78bda702d58.tar.xz |
Update to use ReallocatePool() from BaseMemoryLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6678 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 037c8cc4f3..ee5f1140dc 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -270,44 +270,6 @@ OutputConfigBody ( }
-
-/**
- Adjusts the size of a previously allocated buffer.
-
-
- @param OldPool A pointer to the buffer whose size is being adjusted.
- @param OldSize The size of the current buffer.
- @param NewSize The size of the new buffer.
-
- @return The new buffer allocated.
-
-**/
-VOID *
-ReallocatePool (
- IN VOID *OldPool,
- IN UINTN OldSize,
- IN UINTN NewSize
- )
-{
- VOID *NewPool;
-
- NewPool = NULL;
- if (NewSize != 0) {
- NewPool = AllocateZeroPool (NewSize);
- }
-
- if (OldPool != NULL) {
- if (NewPool != NULL) {
- CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);
- }
-
- FreePool (OldPool);
- }
-
- return NewPool;
-}
-
-
/**
Append a string to a multi-string format.
@@ -346,9 +308,9 @@ AppendToMultiString ( if (MultiStringSize + AppendStringSize > MAX_STRING_LENGTH ||
MultiStringSize > MAX_STRING_LENGTH) {
*MultiString = (EFI_STRING) ReallocatePool (
- (VOID *) (*MultiString),
MultiStringSize,
- MultiStringSize + AppendStringSize
+ MultiStringSize + AppendStringSize,
+ (VOID *) (*MultiString)
);
}
|