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:
committed by
mergify[bot]
parent
2f88bd3a12
commit
d1050b9dff
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "Udp6Impl.h"
|
||||
|
||||
EFI_DRIVER_BINDING_PROTOCOL gUdp6DriverBinding = {
|
||||
EFI_DRIVER_BINDING_PROTOCOL gUdp6DriverBinding = {
|
||||
Udp6DriverBindingSupported,
|
||||
Udp6DriverBindingStart,
|
||||
Udp6DriverBindingStop,
|
||||
@@ -18,7 +18,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUdp6DriverBinding = {
|
||||
NULL
|
||||
};
|
||||
|
||||
EFI_SERVICE_BINDING_PROTOCOL mUdp6ServiceBinding = {
|
||||
EFI_SERVICE_BINDING_PROTOCOL mUdp6ServiceBinding = {
|
||||
Udp6ServiceBindingCreateChild,
|
||||
Udp6ServiceBindingDestroyChild
|
||||
};
|
||||
@@ -74,6 +74,7 @@ Udp6DriverBindingSupported (
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
//
|
||||
// Test for the Udp6ServiceBinding Protocol
|
||||
//
|
||||
@@ -88,6 +89,7 @@ Udp6DriverBindingSupported (
|
||||
if (!EFI_ERROR (Status)) {
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Test for the Ip6ServiceBinding Protocol
|
||||
//
|
||||
@@ -166,6 +168,7 @@ EXIT:
|
||||
FreePool (Udp6Service);
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -183,8 +186,8 @@ EXIT:
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
Udp6DestroyChildEntryInHandleBuffer (
|
||||
IN LIST_ENTRY *Entry,
|
||||
IN VOID *Context
|
||||
IN LIST_ENTRY *Entry,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
UDP6_INSTANCE_DATA *Instance;
|
||||
@@ -192,14 +195,14 @@ Udp6DestroyChildEntryInHandleBuffer (
|
||||
UINTN NumberOfChildren;
|
||||
EFI_HANDLE *ChildHandleBuffer;
|
||||
|
||||
if (Entry == NULL || Context == NULL) {
|
||||
if ((Entry == NULL) || (Context == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Instance = NET_LIST_USER_STRUCT_S (Entry, UDP6_INSTANCE_DATA, Link, UDP6_INSTANCE_DATA_SIGNATURE);
|
||||
ServiceBinding = ((UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *) Context)->ServiceBinding;
|
||||
NumberOfChildren = ((UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *) Context)->NumberOfChildren;
|
||||
ChildHandleBuffer = ((UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *) Context)->ChildHandleBuffer;
|
||||
Instance = NET_LIST_USER_STRUCT_S (Entry, UDP6_INSTANCE_DATA, Link, UDP6_INSTANCE_DATA_SIGNATURE);
|
||||
ServiceBinding = ((UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *)Context)->ServiceBinding;
|
||||
NumberOfChildren = ((UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *)Context)->NumberOfChildren;
|
||||
ChildHandleBuffer = ((UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *)Context)->ChildHandleBuffer;
|
||||
|
||||
if (!NetIsInHandleBuffer (Instance->ChildHandle, NumberOfChildren, ChildHandleBuffer)) {
|
||||
return EFI_SUCCESS;
|
||||
@@ -258,7 +261,7 @@ Udp6DriverBindingStop (
|
||||
Status = gBS->OpenProtocol (
|
||||
NicHandle,
|
||||
&gEfiUdp6ServiceBindingProtocolGuid,
|
||||
(VOID **) &ServiceBinding,
|
||||
(VOID **)&ServiceBinding,
|
||||
This->DriverBindingHandle,
|
||||
NicHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
@@ -273,23 +276,23 @@ Udp6DriverBindingStop (
|
||||
//
|
||||
// NumberOfChildren is not zero, destroy the children instances in ChildHandleBuffer.
|
||||
//
|
||||
List = &Udp6Service->ChildrenList;
|
||||
List = &Udp6Service->ChildrenList;
|
||||
Context.ServiceBinding = ServiceBinding;
|
||||
Context.NumberOfChildren = NumberOfChildren;
|
||||
Context.ChildHandleBuffer = ChildHandleBuffer;
|
||||
Status = NetDestroyLinkList (
|
||||
List,
|
||||
Udp6DestroyChildEntryInHandleBuffer,
|
||||
&Context,
|
||||
NULL
|
||||
);
|
||||
Status = NetDestroyLinkList (
|
||||
List,
|
||||
Udp6DestroyChildEntryInHandleBuffer,
|
||||
&Context,
|
||||
NULL
|
||||
);
|
||||
} else if (IsListEmpty (&Udp6Service->ChildrenList)) {
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
NicHandle,
|
||||
&gEfiUdp6ServiceBindingProtocolGuid,
|
||||
&Udp6Service->ServiceBinding,
|
||||
NULL
|
||||
);
|
||||
NicHandle,
|
||||
&gEfiUdp6ServiceBindingProtocolGuid,
|
||||
&Udp6Service->ServiceBinding,
|
||||
NULL
|
||||
);
|
||||
|
||||
Udp6CleanService (Udp6Service);
|
||||
FreePool (Udp6Service);
|
||||
@@ -376,7 +379,7 @@ Udp6ServiceBindingCreateChild (
|
||||
Status = gBS->OpenProtocol (
|
||||
Udp6Service->IpIo->ChildHandle,
|
||||
&gEfiIp6ProtocolGuid,
|
||||
(VOID **) &Ip6,
|
||||
(VOID **)&Ip6,
|
||||
gUdp6DriverBinding.DriverBindingHandle,
|
||||
Instance->ChildHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
@@ -391,7 +394,7 @@ Udp6ServiceBindingCreateChild (
|
||||
Status = gBS->OpenProtocol (
|
||||
Instance->IpInfo->ChildHandle,
|
||||
&gEfiIp6ProtocolGuid,
|
||||
(VOID **) &Ip6,
|
||||
(VOID **)&Ip6,
|
||||
gUdp6DriverBinding.DriverBindingHandle,
|
||||
Instance->ChildHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
@@ -478,7 +481,7 @@ Udp6ServiceBindingDestroyChild (
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiUdp6ProtocolGuid,
|
||||
(VOID **) &Udp6Proto,
|
||||
(VOID **)&Udp6Proto,
|
||||
gUdp6DriverBinding.DriverBindingHandle,
|
||||
ChildHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
@@ -502,11 +505,11 @@ Udp6ServiceBindingDestroyChild (
|
||||
// Close the Ip6 protocol on the default IpIo.
|
||||
//
|
||||
Status = gBS->CloseProtocol (
|
||||
Udp6Service->IpIo->ChildHandle,
|
||||
&gEfiIp6ProtocolGuid,
|
||||
gUdp6DriverBinding.DriverBindingHandle,
|
||||
Instance->ChildHandle
|
||||
);
|
||||
Udp6Service->IpIo->ChildHandle,
|
||||
&gEfiIp6ProtocolGuid,
|
||||
gUdp6DriverBinding.DriverBindingHandle,
|
||||
Instance->ChildHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Instance->InDestroy = FALSE;
|
||||
return Status;
|
||||
@@ -516,11 +519,11 @@ Udp6ServiceBindingDestroyChild (
|
||||
// Close the Ip6 protocol on this instance's IpInfo.
|
||||
//
|
||||
Status = gBS->CloseProtocol (
|
||||
Instance->IpInfo->ChildHandle,
|
||||
&gEfiIp6ProtocolGuid,
|
||||
gUdp6DriverBinding.DriverBindingHandle,
|
||||
Instance->ChildHandle
|
||||
);
|
||||
Instance->IpInfo->ChildHandle,
|
||||
&gEfiIp6ProtocolGuid,
|
||||
gUdp6DriverBinding.DriverBindingHandle,
|
||||
Instance->ChildHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Instance->InDestroy = FALSE;
|
||||
return Status;
|
||||
@@ -532,7 +535,7 @@ Udp6ServiceBindingDestroyChild (
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
ChildHandle,
|
||||
&gEfiUdp6ProtocolGuid,
|
||||
(VOID *) &Instance->Udp6Proto,
|
||||
(VOID *)&Instance->Udp6Proto,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -611,13 +614,11 @@ Udp6DriverEntryPoint (
|
||||
// Initialize the UDP random port.
|
||||
//
|
||||
mUdp6RandomPort = (UINT16)(
|
||||
((UINT16) NetRandomInitSeed ()) %
|
||||
UDP6_PORT_KNOWN +
|
||||
UDP6_PORT_KNOWN
|
||||
);
|
||||
((UINT16)NetRandomInitSeed ()) %
|
||||
UDP6_PORT_KNOWN +
|
||||
UDP6_PORT_KNOWN
|
||||
);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user