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>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:07 -08:00
committed by mergify[bot]
parent 2f88bd3a12
commit d1050b9dff
294 changed files with 29888 additions and 30440 deletions

View File

@@ -19,7 +19,6 @@ EFI_UDP6_PROTOCOL mUdp6Protocol = {
Udp6Poll
};
/**
This function copies the current operational settings of this EFI UDPv6 Protocol
instance into user-supplied buffers. This function is used optionally to retrieve
@@ -91,7 +90,6 @@ Udp6GetModeData (
return Status;
}
/**
This function is used to do the following:
Initialize and start this instance of the EFI UDPv6 Protocol.
@@ -159,16 +157,16 @@ Udp6Configure (
Status = EFI_SUCCESS;
ASSERT (Udp6Service != NULL);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
if (UdpConfigData != NULL) {
IP6_COPY_ADDRESS (&StationAddress, &UdpConfigData->StationAddress);
IP6_COPY_ADDRESS (&RemoteAddress, &UdpConfigData->RemoteAddress);
if ((!NetIp6IsUnspecifiedAddr (&StationAddress) && !NetIp6IsValidUnicast (&StationAddress)) ||
(!NetIp6IsUnspecifiedAddr (&RemoteAddress) && !NetIp6IsValidUnicast (&RemoteAddress))
){
)
{
//
// If not use default address, and StationAddress is not a valid unicast
// if it is not IPv6 address or RemoteAddress is not a valid unicast IPv6
@@ -286,7 +284,6 @@ ON_EXIT:
return Status;
}
/**
This function is used to enable and disable the multicast group filtering.
@@ -348,12 +345,13 @@ Udp6Groups (
if (McastIp != NULL) {
FreePool (McastIp);
}
return EFI_NOT_STARTED;
}
Ip = Instance->IpInfo->Ip.Ip6;
Ip = Instance->IpInfo->Ip.Ip6;
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
//
// Invoke the Ip instance the Udp6 instance consumes to do the group operation.
@@ -371,10 +369,8 @@ Udp6Groups (
// the multicast datagrams destinated to multicast IPs the other instances configured.
//
if (JoinFlag) {
Status = NetMapInsertTail (&Instance->McastIps, (VOID *) McastIp, NULL);
Status = NetMapInsertTail (&Instance->McastIps, (VOID *)McastIp, NULL);
} else {
Status = NetMapIterate (&Instance->McastIps, Udp6LeaveGroup, MulticastAddress);
if ((MulticastAddress != NULL) && (Status == EFI_ABORTED)) {
Status = EFI_SUCCESS;
@@ -394,8 +390,6 @@ ON_EXIT:
return Status;
}
/**
This function places a sending request to this instance of the EFI UDPv6 Protocol,
alongside the transmit data that was filled by the user.
@@ -490,7 +484,8 @@ Udp6Transmit (
if (EFI_ERROR (NetMapIterate (&Instance->TxTokens, Udp6TokenExist, Token)) ||
EFI_ERROR (NetMapIterate (&Instance->RxTokens, Udp6TokenExist, Token))
){
)
{
//
// Try to find a duplicate token in the two token maps, if found, return
// EFI_ACCESS_DENIED.
@@ -505,7 +500,7 @@ Udp6Transmit (
// Create a net buffer to hold the user buffer and the udp header.
//
Packet = NetbufFromExt (
(NET_FRAGMENT *) TxData->FragmentTable,
(NET_FRAGMENT *)TxData->FragmentTable,
TxData->FragmentCount,
UDP6_HEADER_SIZE,
0,
@@ -520,10 +515,10 @@ Udp6Transmit (
//
// Store the IpIo in ProtoData.
//
Udp6Service = Instance->Udp6Service;
*((UINTN *) &Packet->ProtoData[0]) = (UINTN) (Udp6Service->IpIo);
Udp6Service = Instance->Udp6Service;
*((UINTN *)&Packet->ProtoData[0]) = (UINTN)(Udp6Service->IpIo);
Udp6Header = (EFI_UDP_HEADER *) NetbufAllocSpace (Packet, UDP6_HEADER_SIZE, TRUE);
Udp6Header = (EFI_UDP_HEADER *)NetbufAllocSpace (Packet, UDP6_HEADER_SIZE, TRUE);
ASSERT (Udp6Header != NULL);
if (Udp6Header == NULL) {
Status = EFI_OUT_OF_RESOURCES;
@@ -535,10 +530,10 @@ Udp6Transmit (
//
// Fill the udp header.
//
Udp6Header->SrcPort = HTONS (ConfigData->StationPort);
Udp6Header->DstPort = HTONS (ConfigData->RemotePort);
Udp6Header->Length = HTONS ((UINT16) Packet->TotalSize);
Udp6Header->Checksum = 0;
Udp6Header->SrcPort = HTONS (ConfigData->StationPort);
Udp6Header->DstPort = HTONS (ConfigData->RemotePort);
Udp6Header->Length = HTONS ((UINT16)Packet->TotalSize);
Udp6Header->Checksum = 0;
//
// Set the UDP Header in NET_BUF, this UDP header is for IP6 can fast get the
// Udp header for pseudoHeadCheckSum.
@@ -564,7 +559,7 @@ Udp6Transmit (
}
//
//Calculate the pseudo head checksum using the overridden parameters.
// Calculate the pseudo head checksum using the overridden parameters.
//
if (!NetIp6IsUnspecifiedAddr (&ConfigData->StationAddress)) {
HeadSum = NetIp6PseudoHeadChecksum (
@@ -590,7 +585,6 @@ Udp6Transmit (
// and the Ipv6 will fill the correct value of this checksum.
//
Udp6Header->Checksum = 0;
}
} else {
//
@@ -611,8 +605,6 @@ Udp6Transmit (
}
}
//
// Fill the IpIo Override data.
//
@@ -631,7 +623,7 @@ Udp6Transmit (
//
// Send out this datagram through IpIo.
//
if (UdpSessionData != NULL){
if (UdpSessionData != NULL) {
IP6_COPY_ADDRESS (&(IpDestAddr.v6), &Destination);
} else {
ZeroMem (&IpDestAddr.v6, sizeof (EFI_IPv6_ADDRESS));
@@ -664,7 +656,6 @@ ON_EXIT:
return Status;
}
/**
This function places a completion token into the receive packet queue. This function
is always asynchronous.
@@ -717,7 +708,8 @@ Udp6Receive (
if (EFI_ERROR (NetMapIterate (&Instance->RxTokens, Udp6TokenExist, Token)) ||
EFI_ERROR (NetMapIterate (&Instance->TxTokens, Udp6TokenExist, Token))
){
)
{
//
// Return EFI_ACCESS_DENIED if the specified token is already in the TxTokens or
// RxTokens map.
@@ -759,7 +751,6 @@ ON_EXIT:
return Status;
}
/**
This function is used to abort a pending transmit or receive request.
@@ -821,7 +812,6 @@ Udp6Cancel (
return Status;
}
/**
This function can be used by network drivers and applications to increase the rate that
data packets are moved between the communications device and the transmit/receive queues.