diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:07 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | d1050b9dff1cace252aff86630bfdb59dff5f507 (patch) | |
tree | 77f796143980742d97a883f62ce339a270474801 /NetworkPkg/ArpDxe/ArpMain.c | |
parent | 2f88bd3a1296c522317f1c21377876de63de5be7 (diff) | |
download | edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.tar.gz |
NetworkPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the NetworkPkg 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: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Diffstat (limited to 'NetworkPkg/ArpDxe/ArpMain.c')
-rw-r--r-- | NetworkPkg/ArpDxe/ArpMain.c | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/NetworkPkg/ArpDxe/ArpMain.c b/NetworkPkg/ArpDxe/ArpMain.c index 1398cdda5e..7c5753b6f0 100644 --- a/NetworkPkg/ArpDxe/ArpMain.c +++ b/NetworkPkg/ArpDxe/ArpMain.c @@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "ArpImpl.h"
-
/**
This function is used to assign a station address to the ARP cache for this instance
of the ARP driver.
@@ -53,9 +52,10 @@ ArpConfigure ( }
if ((ConfigData != NULL) &&
- ((ConfigData->SwAddressLength == 0) ||
- (ConfigData->StationAddress == NULL) ||
- (ConfigData->SwAddressType <= 1500))) {
+ ((ConfigData->SwAddressLength == 0) ||
+ (ConfigData->StationAddress == NULL) ||
+ (ConfigData->SwAddressType <= 1500)))
+ {
return EFI_INVALID_PARAMETER;
}
@@ -73,7 +73,6 @@ ArpConfigure ( return Status;
}
-
/**
This function is used to insert entries into the ARP cache.
@@ -143,8 +142,9 @@ ArpAdd ( }
if (((!DenyFlag) && ((TargetHwAddress == NULL) || (TargetSwAddress == NULL))) ||
- (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||
- ((TargetHwAddress == NULL) && (TargetSwAddress == NULL))) {
+ (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||
+ ((TargetHwAddress == NULL) && (TargetSwAddress == NULL)))
+ {
return EFI_INVALID_PARAMETER;
}
@@ -162,7 +162,7 @@ ArpAdd ( // Fill the hardware address part in the MatchAddress.
//
MatchAddress[Hardware].Type = SnpMode->IfType;
- MatchAddress[Hardware].Length = (UINT8) SnpMode->HwAddressSize;
+ MatchAddress[Hardware].Length = (UINT8)SnpMode->HwAddressSize;
MatchAddress[Hardware].AddressPtr = TargetHwAddress;
//
@@ -271,7 +271,6 @@ UNLOCK_EXIT: return Status;
}
-
/**
This function searches the ARP cache for matching entries and allocates a buffer into
which those entries are copied.
@@ -323,12 +322,13 @@ ArpFind ( EFI_TPL OldTpl;
if ((This == NULL) ||
- (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||
- ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL)))) {
+ (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||
+ ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL))))
+ {
return EFI_INVALID_PARAMETER;
}
- Instance = ARP_INSTANCE_DATA_FROM_THIS (This);
+ Instance = ARP_INSTANCE_DATA_FROM_THIS (This);
if (!Instance->Configured) {
return EFI_NOT_STARTED;
@@ -354,7 +354,6 @@ ArpFind ( return Status;
}
-
/**
This function removes specified ARP cache entries.
@@ -406,7 +405,6 @@ ArpDelete ( return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;
}
-
/**
This function delete all dynamic entries from the ARP cache that match the specified
software protocol type.
@@ -451,7 +449,6 @@ ArpFlush ( return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;
}
-
/**
This function tries to resolve the TargetSwAddress and optionally returns a
TargetHwAddress if it already exists in the ARP cache.
@@ -508,8 +505,9 @@ ArpRequest ( SnpMode = &ArpService->SnpMode;
if ((TargetSwAddress == NULL) ||
- ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&
- IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress)))) {
+ ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&
+ IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress))))
+ {
//
// Return the hardware broadcast address.
//
@@ -519,7 +517,8 @@ ArpRequest ( }
if ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&
- IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress)))) {
+ IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress))))
+ {
//
// If the software address is an IPv4 multicast address, invoke Mnp to
// resolve the address.
@@ -588,7 +587,7 @@ ArpRequest ( //
// Create a request context for this arp request.
//
- RequestContext = AllocatePool (sizeof(USER_REQUEST_CONTEXT));
+ RequestContext = AllocatePool (sizeof (USER_REQUEST_CONTEXT));
if (RequestContext == NULL) {
DEBUG ((DEBUG_ERROR, "ArpRequest: Allocate memory for RequestContext failed.\n"));
@@ -612,7 +611,6 @@ ArpRequest ( NULL
);
if (CacheEntry != NULL) {
-
CacheEntry->NextRetryTime = Instance->ConfigData.RetryTimeOut;
CacheEntry->RetryCount = Instance->ConfigData.RetryCount;
} else {
@@ -668,7 +666,6 @@ SIGNAL_USER: return Status;
}
-
/**
This function aborts the previous ARP request (identified by This, TargetSwAddress
and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().
@@ -709,8 +706,9 @@ ArpCancel ( EFI_TPL OldTpl;
if ((This == NULL) ||
- ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||
- ((TargetSwAddress == NULL) && (ResolvedEvent != NULL))) {
+ ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||
+ ((TargetSwAddress == NULL) && (ResolvedEvent != NULL)))
+ {
return EFI_INVALID_PARAMETER;
}
|