SecurityPkg: Apply uncrustify changes

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

Apply uncrustify changes to .c/.h files in the SecurityPkg 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: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:12 -08:00
committed by mergify[bot]
parent 39de741e2d
commit c411b485b6
185 changed files with 15251 additions and 14419 deletions

View File

@@ -8,10 +8,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include "SecureBootConfigImpl.h"
VOID *mStartOpCodeHandle = NULL;
VOID *mEndOpCodeHandle = NULL;
EFI_IFR_GUID_LABEL *mStartLabel = NULL;
EFI_IFR_GUID_LABEL *mEndLabel = NULL;
VOID *mStartOpCodeHandle = NULL;
VOID *mEndOpCodeHandle = NULL;
EFI_IFR_GUID_LABEL *mStartLabel = NULL;
EFI_IFR_GUID_LABEL *mEndLabel = NULL;
/**
Refresh the global UpdateData structure.
@@ -37,12 +37,12 @@ RefreshUpdateData (
//
// Create Hii Extend Label OpCode as the start opcode
//
mStartLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (
mStartOpCodeHandle,
&gEfiIfrTianoGuid,
NULL,
sizeof (EFI_IFR_GUID_LABEL)
);
mStartLabel = (EFI_IFR_GUID_LABEL *)HiiCreateGuidOpCode (
mStartOpCodeHandle,
&gEfiIfrTianoGuid,
NULL,
sizeof (EFI_IFR_GUID_LABEL)
);
mStartLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL;
}
@@ -55,8 +55,8 @@ RefreshUpdateData (
**/
VOID
CleanUpPage (
IN UINT16 LabelId,
IN SECUREBOOT_CONFIG_PRIVATE_DATA *PrivateData
IN UINT16 LabelId,
IN SECUREBOOT_CONFIG_PRIVATE_DATA *PrivateData
)
{
RefreshUpdateData ();
@@ -87,39 +87,38 @@ CleanUpPage (
**/
CHAR16 *
ExtractFileNameFromDevicePath (
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
)
{
CHAR16 *String;
CHAR16 *MatchString;
CHAR16 *LastMatch;
CHAR16 *FileName;
UINTN Length;
CHAR16 *String;
CHAR16 *MatchString;
CHAR16 *LastMatch;
CHAR16 *FileName;
UINTN Length;
ASSERT(DevicePath != NULL);
ASSERT (DevicePath != NULL);
String = DevicePathToStr(DevicePath);
String = DevicePathToStr (DevicePath);
MatchString = String;
LastMatch = String;
FileName = NULL;
while(MatchString != NULL){
while (MatchString != NULL) {
LastMatch = MatchString + 1;
MatchString = StrStr(LastMatch,L"\\");
MatchString = StrStr (LastMatch, L"\\");
}
Length = StrLen(LastMatch);
FileName = AllocateCopyPool ((Length + 1) * sizeof(CHAR16), LastMatch);
Length = StrLen (LastMatch);
FileName = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), LastMatch);
if (FileName != NULL) {
*(FileName + Length) = 0;
}
FreePool(String);
FreePool (String);
return FileName;
}
/**
Update the form base on the selected file.
@@ -131,19 +130,20 @@ ExtractFileNameFromDevicePath (
**/
BOOLEAN
UpdatePage(
UpdatePage (
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
IN EFI_FORM_ID FormId
)
{
CHAR16 *FileName;
EFI_STRING_ID StringToken;
CHAR16 *FileName;
EFI_STRING_ID StringToken;
FileName = NULL;
if (FilePath != NULL) {
FileName = ExtractFileNameFromDevicePath(FilePath);
FileName = ExtractFileNameFromDevicePath (FilePath);
}
if (FileName == NULL) {
//
// FileName = NULL has two case:
@@ -153,6 +153,7 @@ UpdatePage(
//
return TRUE;
}
StringToken = HiiSetString (gSecureBootPrivateData->HiiHandle, 0, FileName, NULL);
gSecureBootPrivateData->FileContext->FileName = FileName;
@@ -175,7 +176,7 @@ UpdatePage(
0,
0,
0
);
);
HiiUpdateForm (
gSecureBootPrivateData->HiiHandle,
@@ -199,11 +200,10 @@ UpdatePage(
BOOLEAN
EFIAPI
UpdatePKFromFile (
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
)
{
return UpdatePage(FilePath, FORMID_ENROLL_PK_FORM);
return UpdatePage (FilePath, FORMID_ENROLL_PK_FORM);
}
/**
@@ -217,10 +217,10 @@ UpdatePKFromFile (
BOOLEAN
EFIAPI
UpdateKEKFromFile (
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
)
{
return UpdatePage(FilePath, FORMID_ENROLL_KEK_FORM);
return UpdatePage (FilePath, FORMID_ENROLL_KEK_FORM);
}
/**
@@ -234,10 +234,10 @@ UpdateKEKFromFile (
BOOLEAN
EFIAPI
UpdateDBFromFile (
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
)
{
return UpdatePage(FilePath, SECUREBOOT_ENROLL_SIGNATURE_TO_DB);
return UpdatePage (FilePath, SECUREBOOT_ENROLL_SIGNATURE_TO_DB);
}
/**
@@ -251,10 +251,10 @@ UpdateDBFromFile (
BOOLEAN
EFIAPI
UpdateDBXFromFile (
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
)
{
return UpdatePage(FilePath, SECUREBOOT_ENROLL_SIGNATURE_TO_DBX);
return UpdatePage (FilePath, SECUREBOOT_ENROLL_SIGNATURE_TO_DBX);
}
/**
@@ -268,9 +268,8 @@ UpdateDBXFromFile (
BOOLEAN
EFIAPI
UpdateDBTFromFile (
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
IN EFI_DEVICE_PATH_PROTOCOL *FilePath
)
{
return UpdatePage(FilePath, SECUREBOOT_ENROLL_SIGNATURE_TO_DBT);
return UpdatePage (FilePath, SECUREBOOT_ENROLL_SIGNATURE_TO_DBT);
}