diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:02 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 1436aea4d5707e672672a11bda72be2c63c936c3 (patch) | |
tree | 370c9d5bd8823aa8ea7bce71a0f29bff71feff67 /MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib | |
parent | 7c7184e201a90a1d2376e615e55e3f4074731468 (diff) | |
download | edk2-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/DxeCrc32GuidedSectionExtractLib')
-rw-r--r-- | MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c | 76 |
1 files changed, 43 insertions, 33 deletions
diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c index 1c0904c..3e40dfa 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c @@ -21,13 +21,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// CRC32 Guided Section header
///
typedef struct {
- EFI_GUID_DEFINED_SECTION GuidedSectionHeader; ///< EFI guided section header
- UINT32 CRC32Checksum; ///< 32bit CRC check sum
+ EFI_GUID_DEFINED_SECTION GuidedSectionHeader; ///< EFI guided section header
+ UINT32 CRC32Checksum; ///< 32bit CRC check sum
} CRC32_SECTION_HEADER;
typedef struct {
- EFI_GUID_DEFINED_SECTION2 GuidedSectionHeader; ///< EFI guided section header
- UINT32 CRC32Checksum; ///< 32bit CRC check sum
+ EFI_GUID_DEFINED_SECTION2 GuidedSectionHeader; ///< EFI guided section header
+ UINT32 CRC32Checksum; ///< 32bit CRC check sum
} CRC32_SECTION2_HEADER;
/**
@@ -60,31 +60,37 @@ Crc32GuidedSectionGetInfo ( // Check whether the input guid section is recognized.
//
if (!CompareGuid (
- &gEfiCrc32GuidedSectionExtractionGuid,
- &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) {
+ &gEfiCrc32GuidedSectionExtractionGuid,
+ &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid)
+ ))
+ {
return EFI_INVALID_PARAMETER;
}
+
//
// Retrieve the size and attribute of the input section data.
//
- *SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes;
+ *SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->Attributes;
*ScratchBufferSize = 0;
- *OutputBufferSize = SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->DataOffset;
+ *OutputBufferSize = SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->DataOffset;
} else {
//
// Check whether the input guid section is recognized.
//
if (!CompareGuid (
- &gEfiCrc32GuidedSectionExtractionGuid,
- &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
+ &gEfiCrc32GuidedSectionExtractionGuid,
+ &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid)
+ ))
+ {
return EFI_INVALID_PARAMETER;
}
+
//
// Retrieve the size and attribute of the input section data.
//
- *SectionAttribute = ((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes;
+ *SectionAttribute = ((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes;
*ScratchBufferSize = 0;
- *OutputBufferSize = SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset;
+ *OutputBufferSize = SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *)InputSection)->DataOffset;
}
return EFI_SUCCESS;
@@ -116,55 +122,59 @@ Crc32GuidedSectionHandler ( OUT UINT32 *AuthenticationStatus
)
{
- EFI_STATUS Status;
- UINT32 SectionCrc32Checksum;
- UINT32 Crc32Checksum;
- UINT32 OutputBufferSize;
- VOID *DummyInterface;
+ EFI_STATUS Status;
+ UINT32 SectionCrc32Checksum;
+ UINT32 Crc32Checksum;
+ UINT32 OutputBufferSize;
+ VOID *DummyInterface;
if (IS_SECTION2 (InputSection)) {
//
// Check whether the input guid section is recognized.
//
if (!CompareGuid (
- &gEfiCrc32GuidedSectionExtractionGuid,
- &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) {
+ &gEfiCrc32GuidedSectionExtractionGuid,
+ &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid)
+ ))
+ {
return EFI_INVALID_PARAMETER;
}
//
// Get section Crc32 checksum.
//
- SectionCrc32Checksum = ((CRC32_SECTION2_HEADER *) InputSection)->CRC32Checksum;
- *OutputBuffer = (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->DataOffset;
- OutputBufferSize = SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->DataOffset;
+ SectionCrc32Checksum = ((CRC32_SECTION2_HEADER *)InputSection)->CRC32Checksum;
+ *OutputBuffer = (UINT8 *)InputSection + ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->DataOffset;
+ OutputBufferSize = SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->DataOffset;
//
// Implicitly CRC32 GUIDed section should have STATUS_VALID bit set
//
- ASSERT (((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID);
+ ASSERT (((EFI_GUID_DEFINED_SECTION2 *)InputSection)->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID);
*AuthenticationStatus = EFI_AUTH_STATUS_IMAGE_SIGNED;
} else {
//
// Check whether the input guid section is recognized.
//
if (!CompareGuid (
- &gEfiCrc32GuidedSectionExtractionGuid,
- &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {
+ &gEfiCrc32GuidedSectionExtractionGuid,
+ &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid)
+ ))
+ {
return EFI_INVALID_PARAMETER;
}
//
// Get section Crc32 checksum.
//
- SectionCrc32Checksum = ((CRC32_SECTION_HEADER *) InputSection)->CRC32Checksum;
- *OutputBuffer = (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset;
- OutputBufferSize = SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset;
+ SectionCrc32Checksum = ((CRC32_SECTION_HEADER *)InputSection)->CRC32Checksum;
+ *OutputBuffer = (UINT8 *)InputSection + ((EFI_GUID_DEFINED_SECTION *)InputSection)->DataOffset;
+ OutputBufferSize = SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *)InputSection)->DataOffset;
//
// Implicitly CRC32 GUIDed section should have STATUS_VALID bit set
//
- ASSERT (((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID);
+ ASSERT (((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID);
*AuthenticationStatus = EFI_AUTH_STATUS_IMAGE_SIGNED;
}
@@ -222,8 +232,8 @@ DxeCrc32GuidedSectionExtractLibConstructor ( )
{
return ExtractGuidedSectionRegisterHandlers (
- &gEfiCrc32GuidedSectionExtractionGuid,
- Crc32GuidedSectionGetInfo,
- Crc32GuidedSectionHandler
- );
+ &gEfiCrc32GuidedSectionExtractionGuid,
+ Crc32GuidedSectionGetInfo,
+ Crc32GuidedSectionHandler
+ );
}
|