MdeModulePkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:02 -08:00
committed by mergify[bot]
parent 7c7184e201
commit 1436aea4d5
994 changed files with 107608 additions and 101311 deletions

View File

@@ -7,7 +7,6 @@
**/
#include "InternalHiiLib.h"
/**
@@ -57,10 +56,10 @@ HiiSetString (
IN CONST CHAR8 *SupportedLanguages OPTIONAL
)
{
EFI_STATUS Status;
CHAR8 *AllocatedLanguages;
CHAR8 *Supported;
CHAR8 *Language;
EFI_STATUS Status;
CHAR8 *AllocatedLanguages;
CHAR8 *Supported;
CHAR8 *Language;
ASSERT (HiiHandle != NULL);
ASSERT (String != NULL);
@@ -97,12 +96,14 @@ HiiSetString (
//
// Search for the next language separator and replace it with a Null-terminator
//
for (; *Supported != 0 && *Supported != ';'; Supported++);
for ( ; *Supported != 0 && *Supported != ';'; Supported++) {
}
if (*Supported != 0) {
*(Supported++) = '\0';
}
if ((SupportedLanguages == NULL) && AsciiStrnCmp (Language, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) == 0) {
if ((SupportedLanguages == NULL) && (AsciiStrnCmp (Language, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) == 0)) {
//
// Skip string package used for keyword protocol.
//
@@ -138,7 +139,6 @@ HiiSetString (
}
}
/**
Retrieves a string from a string package names by GUID in a specific language.
If the language is not specified, then a string from a string package in the
@@ -292,7 +292,7 @@ HiiGetStringEx (
//
// Get the current platform language setting
//
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
GetEfiGlobalVariable2 (L"PlatformLang", (VOID **)&PlatformLanguage, NULL);
//
// If Languag is NULL, then set it to an empty string, so it will be
@@ -318,23 +318,22 @@ HiiGetStringEx (
goto Error;
}
} else {
BestLanguage = (CHAR8 *) Language;
BestLanguage = (CHAR8 *)Language;
}
//
// Retrieve the size of the string in the string package for the BestLanguage
//
StringSize = 0;
Status = gHiiString->GetString (
gHiiString,
BestLanguage,
HiiHandle,
StringId,
&TempString,
&StringSize,
NULL
);
Status = gHiiString->GetString (
gHiiString,
BestLanguage,
HiiHandle,
StringId,
&TempString,
&StringSize,
NULL
);
//
// If GetString() returns EFI_SUCCESS for a zero size,
// then there are no supported languages registered for HiiHandle. If GetString()
@@ -380,10 +379,12 @@ Error:
if (SupportedLanguages != NULL) {
FreePool (SupportedLanguages);
}
if (PlatformLanguage != NULL) {
FreePool (PlatformLanguage);
}
if (TryBestLanguage && BestLanguage != NULL) {
if (TryBestLanguage && (BestLanguage != NULL)) {
FreePool (BestLanguage);
}