]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/ArpDxe/ArpMain.c
NetworkPkg: Apply uncrustify changes
[mirror_edk2.git] / NetworkPkg / ArpDxe / ArpMain.c
index 1398cdda5eabecff1b64ad8b010a8496d8223add..7c5753b6f034f851043d8b05dcf55074b4653c7a 100644 (file)
@@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 \r
 #include "ArpImpl.h"\r
 \r
-\r
 /**\r
   This function is used to assign a station address to the ARP cache for this instance\r
   of the ARP driver.\r
@@ -53,9 +52,10 @@ ArpConfigure (
   }\r
 \r
   if ((ConfigData != NULL) &&\r
-    ((ConfigData->SwAddressLength == 0) ||\r
-    (ConfigData->StationAddress == NULL) ||\r
-    (ConfigData->SwAddressType <= 1500))) {\r
+      ((ConfigData->SwAddressLength == 0) ||\r
+       (ConfigData->StationAddress == NULL) ||\r
+       (ConfigData->SwAddressType <= 1500)))\r
+  {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -73,7 +73,6 @@ ArpConfigure (
   return Status;\r
 }\r
 \r
-\r
 /**\r
   This function is used to insert entries into the ARP cache.\r
 \r
@@ -143,8 +142,9 @@ ArpAdd (
   }\r
 \r
   if (((!DenyFlag) && ((TargetHwAddress == NULL) || (TargetSwAddress == NULL))) ||\r
-    (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||\r
-    ((TargetHwAddress == NULL) && (TargetSwAddress == NULL))) {\r
+      (DenyFlag && (TargetHwAddress != NULL) && (TargetSwAddress != NULL)) ||\r
+      ((TargetHwAddress == NULL) && (TargetSwAddress == NULL)))\r
+  {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -162,7 +162,7 @@ ArpAdd (
   // Fill the hardware address part in the MatchAddress.\r
   //\r
   MatchAddress[Hardware].Type       = SnpMode->IfType;\r
-  MatchAddress[Hardware].Length     = (UINT8) SnpMode->HwAddressSize;\r
+  MatchAddress[Hardware].Length     = (UINT8)SnpMode->HwAddressSize;\r
   MatchAddress[Hardware].AddressPtr = TargetHwAddress;\r
 \r
   //\r
@@ -271,7 +271,6 @@ UNLOCK_EXIT:
   return Status;\r
 }\r
 \r
-\r
 /**\r
   This function searches the ARP cache for matching entries and allocates a buffer into\r
   which those entries are copied.\r
@@ -323,12 +322,13 @@ ArpFind (
   EFI_TPL            OldTpl;\r
 \r
   if ((This == NULL) ||\r
-    (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||\r
-    ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL)))) {\r
+      (!Refresh && (EntryCount == NULL) && (EntryLength == NULL)) ||\r
+      ((Entries != NULL) && ((EntryLength == NULL) || (EntryCount == NULL))))\r
+  {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  Instance   = ARP_INSTANCE_DATA_FROM_THIS (This);\r
+  Instance = ARP_INSTANCE_DATA_FROM_THIS (This);\r
 \r
   if (!Instance->Configured) {\r
     return EFI_NOT_STARTED;\r
@@ -354,7 +354,6 @@ ArpFind (
   return Status;\r
 }\r
 \r
-\r
 /**\r
   This function removes specified ARP cache entries.\r
 \r
@@ -406,7 +405,6 @@ ArpDelete (
   return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   This function delete all dynamic entries from the ARP cache that match the specified\r
   software protocol type.\r
@@ -451,7 +449,6 @@ ArpFlush (
   return (Count == 0) ? EFI_NOT_FOUND : EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
   This function tries to resolve the TargetSwAddress and optionally returns a\r
   TargetHwAddress if it already exists in the ARP cache.\r
@@ -508,8 +505,9 @@ ArpRequest (
   SnpMode    = &ArpService->SnpMode;\r
 \r
   if ((TargetSwAddress == NULL) ||\r
-    ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
-    IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress)))) {\r
+      ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
+       IP4_IS_LOCAL_BROADCAST (*((UINT32 *)TargetSwAddress))))\r
+  {\r
     //\r
     // Return the hardware broadcast address.\r
     //\r
@@ -519,7 +517,8 @@ ArpRequest (
   }\r
 \r
   if ((Instance->ConfigData.SwAddressType == IPV4_ETHER_PROTO_TYPE) &&\r
-    IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress)))) {\r
+      IP4_IS_MULTICAST (NTOHL (*((UINT32 *)TargetSwAddress))))\r
+  {\r
     //\r
     // If the software address is an IPv4 multicast address, invoke Mnp to\r
     // resolve the address.\r
@@ -588,7 +587,7 @@ ArpRequest (
   //\r
   // Create a request context for this arp request.\r
   //\r
-  RequestContext = AllocatePool (sizeof(USER_REQUEST_CONTEXT));\r
+  RequestContext = AllocatePool (sizeof (USER_REQUEST_CONTEXT));\r
   if (RequestContext == NULL) {\r
     DEBUG ((DEBUG_ERROR, "ArpRequest: Allocate memory for RequestContext failed.\n"));\r
 \r
@@ -612,7 +611,6 @@ ArpRequest (
                  NULL\r
                  );\r
   if (CacheEntry != NULL) {\r
-\r
     CacheEntry->NextRetryTime = Instance->ConfigData.RetryTimeOut;\r
     CacheEntry->RetryCount    = Instance->ConfigData.RetryCount;\r
   } else {\r
@@ -668,7 +666,6 @@ SIGNAL_USER:
   return Status;\r
 }\r
 \r
-\r
 /**\r
   This function aborts the previous ARP request (identified by This,  TargetSwAddress\r
   and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().\r
@@ -709,8 +706,9 @@ ArpCancel (
   EFI_TPL            OldTpl;\r
 \r
   if ((This == NULL) ||\r
-    ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||\r
-    ((TargetSwAddress == NULL) && (ResolvedEvent != NULL))) {\r
+      ((TargetSwAddress != NULL) && (ResolvedEvent == NULL)) ||\r
+      ((TargetSwAddress == NULL) && (ResolvedEvent != NULL)))\r
+  {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r