Enhance the code to make the code logic more clear.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13650 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2012-08-21 00:57:17 +00:00
parent 48ee8e3e8c
commit d6bee311ce
3 changed files with 8 additions and 2 deletions

View File

@ -815,7 +815,7 @@ GetToken (
String = HiiGetString (HiiHandle, Token, NULL); String = HiiGetString (HiiHandle, Token, NULL);
if (String == NULL) { if (String == NULL) {
String = AllocateCopyPool (sizeof (mUnknownString), mUnknownString); String = AllocateCopyPool (StrSize (mUnknownString), mUnknownString);
ASSERT (String != NULL); ASSERT (String != NULL);
} }
return (CHAR16 *) String; return (CHAR16 *) String;
@ -3269,7 +3269,7 @@ ExtractDefault (
// //
// Initilize Questions' Value // Initilize Questions' Value
// //
LoadFormSetConfig (NULL, LocalFormSet); Status = LoadFormSetConfig (NULL, LocalFormSet);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
DestroyFormSet (LocalFormSet); DestroyFormSet (LocalFormSet);
continue; continue;

View File

@ -957,6 +957,9 @@ CreateDialog (
TempString[Index - 1] = CHAR_NULL; TempString[Index - 1] = CHAR_NULL;
StrCpy (StringBuffer, TempString); StrCpy (StringBuffer, TempString);
} }
//
// break skipped on purpose
//
default: default:
// //

View File

@ -517,6 +517,9 @@ BasePrintLibSPrintMarker (
if (sizeof (VOID *) > 4) { if (sizeof (VOID *) > 4) {
Flags |= LONG_TYPE; Flags |= LONG_TYPE;
} }
//
// break skipped on purpose
//
case 'X': case 'X':
Flags |= PREFIX_ZERO; Flags |= PREFIX_ZERO;
// //