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:
committed by
mergify[bot]
parent
7c7184e201
commit
1436aea4d5
@ -19,7 +19,7 @@
|
||||
#include <Library/SortLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
|
||||
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||
|
||||
#define USL_FREE_NON_NULL(Pointer) \
|
||||
{ \
|
||||
@ -50,19 +50,19 @@ STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||
VOID
|
||||
EFIAPI
|
||||
PerformQuickSort (
|
||||
IN OUT VOID *BufferToSort,
|
||||
IN CONST UINTN Count,
|
||||
IN CONST UINTN ElementSize,
|
||||
IN SORT_COMPARE CompareFunction
|
||||
IN OUT VOID *BufferToSort,
|
||||
IN CONST UINTN Count,
|
||||
IN CONST UINTN ElementSize,
|
||||
IN SORT_COMPARE CompareFunction
|
||||
)
|
||||
{
|
||||
VOID *Buffer;
|
||||
|
||||
ASSERT(BufferToSort != NULL);
|
||||
ASSERT(CompareFunction != NULL);
|
||||
ASSERT (BufferToSort != NULL);
|
||||
ASSERT (CompareFunction != NULL);
|
||||
|
||||
Buffer = AllocateZeroPool(ElementSize);
|
||||
ASSERT(Buffer != NULL);
|
||||
Buffer = AllocateZeroPool (ElementSize);
|
||||
ASSERT (Buffer != NULL);
|
||||
|
||||
QuickSort (
|
||||
BufferToSort,
|
||||
@ -72,7 +72,7 @@ PerformQuickSort (
|
||||
Buffer
|
||||
);
|
||||
|
||||
FreePool(Buffer);
|
||||
FreePool (Buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -89,8 +89,8 @@ PerformQuickSort (
|
||||
INTN
|
||||
EFIAPI
|
||||
DevicePathCompare (
|
||||
IN CONST VOID *Buffer1,
|
||||
IN CONST VOID *Buffer2
|
||||
IN CONST VOID *Buffer1,
|
||||
IN CONST VOID *Buffer2
|
||||
)
|
||||
{
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath1;
|
||||
@ -100,8 +100,8 @@ DevicePathCompare (
|
||||
EFI_STATUS Status;
|
||||
INTN RetVal;
|
||||
|
||||
DevicePath1 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer1;
|
||||
DevicePath2 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer2;
|
||||
DevicePath1 = *(EFI_DEVICE_PATH_PROTOCOL **)Buffer1;
|
||||
DevicePath2 = *(EFI_DEVICE_PATH_PROTOCOL **)Buffer2;
|
||||
|
||||
if (DevicePath1 == NULL) {
|
||||
if (DevicePath2 == NULL) {
|
||||
@ -116,37 +116,41 @@ DevicePathCompare (
|
||||
}
|
||||
|
||||
if (mUnicodeCollation == NULL) {
|
||||
Status = gBS->LocateProtocol(
|
||||
&gEfiUnicodeCollation2ProtocolGuid,
|
||||
NULL,
|
||||
(VOID**)&mUnicodeCollation);
|
||||
Status = gBS->LocateProtocol (
|
||||
&gEfiUnicodeCollation2ProtocolGuid,
|
||||
NULL,
|
||||
(VOID **)&mUnicodeCollation
|
||||
);
|
||||
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
TextPath1 = ConvertDevicePathToText(
|
||||
DevicePath1,
|
||||
FALSE,
|
||||
FALSE);
|
||||
TextPath1 = ConvertDevicePathToText (
|
||||
DevicePath1,
|
||||
FALSE,
|
||||
FALSE
|
||||
);
|
||||
|
||||
TextPath2 = ConvertDevicePathToText(
|
||||
DevicePath2,
|
||||
FALSE,
|
||||
FALSE);
|
||||
TextPath2 = ConvertDevicePathToText (
|
||||
DevicePath2,
|
||||
FALSE,
|
||||
FALSE
|
||||
);
|
||||
|
||||
if (TextPath1 == NULL) {
|
||||
RetVal = -1;
|
||||
} else if (TextPath2 == NULL) {
|
||||
RetVal = 1;
|
||||
} else {
|
||||
RetVal = mUnicodeCollation->StriColl(
|
||||
mUnicodeCollation,
|
||||
TextPath1,
|
||||
TextPath2);
|
||||
RetVal = mUnicodeCollation->StriColl (
|
||||
mUnicodeCollation,
|
||||
TextPath1,
|
||||
TextPath2
|
||||
);
|
||||
}
|
||||
|
||||
USL_FREE_NON_NULL(TextPath1);
|
||||
USL_FREE_NON_NULL(TextPath2);
|
||||
USL_FREE_NON_NULL (TextPath1);
|
||||
USL_FREE_NON_NULL (TextPath2);
|
||||
|
||||
return (RetVal);
|
||||
}
|
||||
@ -164,27 +168,29 @@ DevicePathCompare (
|
||||
INTN
|
||||
EFIAPI
|
||||
StringNoCaseCompare (
|
||||
IN CONST VOID *Buffer1,
|
||||
IN CONST VOID *Buffer2
|
||||
IN CONST VOID *Buffer1,
|
||||
IN CONST VOID *Buffer2
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
if (mUnicodeCollation == NULL) {
|
||||
Status = gBS->LocateProtocol(
|
||||
&gEfiUnicodeCollation2ProtocolGuid,
|
||||
NULL,
|
||||
(VOID**)&mUnicodeCollation);
|
||||
EFI_STATUS Status;
|
||||
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
if (mUnicodeCollation == NULL) {
|
||||
Status = gBS->LocateProtocol (
|
||||
&gEfiUnicodeCollation2ProtocolGuid,
|
||||
NULL,
|
||||
(VOID **)&mUnicodeCollation
|
||||
);
|
||||
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
return (mUnicodeCollation->StriColl(
|
||||
mUnicodeCollation,
|
||||
*(CHAR16**)Buffer1,
|
||||
*(CHAR16**)Buffer2));
|
||||
return (mUnicodeCollation->StriColl (
|
||||
mUnicodeCollation,
|
||||
*(CHAR16 **)Buffer1,
|
||||
*(CHAR16 **)Buffer2
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Function to compare 2 strings.
|
||||
|
||||
@ -198,11 +204,12 @@ StringNoCaseCompare (
|
||||
INTN
|
||||
EFIAPI
|
||||
StringCompare (
|
||||
IN CONST VOID *Buffer1,
|
||||
IN CONST VOID *Buffer2
|
||||
IN CONST VOID *Buffer1,
|
||||
IN CONST VOID *Buffer2
|
||||
)
|
||||
{
|
||||
return (StrCmp(
|
||||
*(CHAR16**)Buffer1,
|
||||
*(CHAR16**)Buffer2));
|
||||
return (StrCmp (
|
||||
*(CHAR16 **)Buffer1,
|
||||
*(CHAR16 **)Buffer2
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user