summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/UefiHiiLib
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-09 07:12:35 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-09 07:12:35 +0000
commitd6a82eaf8d8971f9d4eecda80f421281363c0772 (patch)
tree5b4fb44fb14e34648ee4864b5b7c7b70090ea425 /MdeModulePkg/Library/UefiHiiLib
parent995c594047fcc85dabb58addd28486c5df04deaa (diff)
downloadedk2-platforms-d6a82eaf8d8971f9d4eecda80f421281363c0772.tar.xz
Update HiiString Protocol and HiiSetString Api in HiiLib
1. Reserve the unique string identifier for all languages in the package list. 2. Track MaxStringId to do the simple check for the requested StringId > MaxStringId, which can improve performance. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9954 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/UefiHiiLib')
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiString.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiString.c b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
index b61a9958d0..70e0f4d648 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiString.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
@@ -1,7 +1,7 @@
/** @file
HII Library implementation that uses DXE protocols and services.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2010, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -66,7 +66,6 @@ HiiSetString (
CHAR8 *AllocatedLanguages;
CHAR8 *Supported;
CHAR8 *Language;
- EFI_STRING_ID NewStringId;
ASSERT (HiiHandle != NULL);
ASSERT (String != NULL);
@@ -90,7 +89,6 @@ HiiSetString (
return (EFI_STRING_ID)(0);
}
- NewStringId = 0;
Status = EFI_INVALID_PARAMETER;
//
// Loop through each language that the string supports
@@ -113,7 +111,7 @@ HiiSetString (
// If StringId is 0, then call NewString(). Otherwise, call SetString()
//
if (StringId == (EFI_STRING_ID)(0)) {
- Status = gHiiString->NewString (gHiiString, HiiHandle, &NewStringId, Language, NULL, String, NULL);
+ Status = gHiiString->NewString (gHiiString, HiiHandle, &StringId, Language, NULL, String, NULL);
} else {
Status = gHiiString->SetString (gHiiString, HiiHandle, StringId, Language, String, NULL);
}
@@ -133,8 +131,6 @@ HiiSetString (
if (EFI_ERROR (Status)) {
return (EFI_STRING_ID)(0);
- } else if (StringId == (EFI_STRING_ID)(0)) {
- return NewStringId;
} else {
return StringId;
}