summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/UefiHiiLib/HiiString.c
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:02 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit1436aea4d5707e672672a11bda72be2c63c936c3 (patch)
tree370c9d5bd8823aa8ea7bce71a0f29bff71feff67 /MdeModulePkg/Library/UefiHiiLib/HiiString.c
parent7c7184e201a90a1d2376e615e55e3f4074731468 (diff)
downloadedk2-1436aea4d5707e672672a11bda72be2c63c936c3.zip
edk2-1436aea4d5707e672672a11bda72be2c63c936c3.tar.gz
edk2-1436aea4d5707e672672a11bda72be2c63c936c3.tar.bz2
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>
Diffstat (limited to 'MdeModulePkg/Library/UefiHiiLib/HiiString.c')
-rw-r--r--MdeModulePkg/Library/UefiHiiLib/HiiString.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiString.c b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
index 078811e..2c586ef 100644
--- a/MdeModulePkg/Library/UefiHiiLib/HiiString.c
+++ b/MdeModulePkg/Library/UefiHiiLib/HiiString.c
@@ -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);
}