]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove the useless goto statements in PXE driver.
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 20 Feb 2013 08:20:14 +0000 (08:20 +0000)
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 20 Feb 2013 08:20:14 +0000 (08:20 +0000)
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14137 6f19259b-4bc3-4df7-8a09-765794883524

NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c
NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c

index 183dc0ced743de24aa6857b4b4b40259b19bc8fd..6c36d058f632ac4a13d7d8bff643f295f1b961a9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This implementation of EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.\r
 \r
 /** @file\r
   This implementation of EFI_PXE_BASE_CODE_PROTOCOL and EFI_LOAD_FILE_PROTOCOL.\r
 \r
-  Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -428,10 +428,6 @@ EfiPxeBcDhcp (
     // Start S.A.R.R. process to get a IPv6 address and other boot information.\r
     //\r
     Status = PxeBcDhcp6Sarr (Private, Private->Dhcp6);\r
     // Start S.A.R.R. process to get a IPv6 address and other boot information.\r
     //\r
     Status = PxeBcDhcp6Sarr (Private, Private->Dhcp6);\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      goto ON_EXIT;\r
-    }\r
   } else {\r
 \r
     //\r
   } else {\r
 \r
     //\r
@@ -443,13 +439,11 @@ EfiPxeBcDhcp (
     // Start D.O.R.A. process to get a IPv4 address and other boot information.\r
     //\r
     Status = PxeBcDhcp4Dora (Private, Private->Dhcp4);\r
     // Start D.O.R.A. process to get a IPv4 address and other boot information.\r
     //\r
     Status = PxeBcDhcp4Dora (Private, Private->Dhcp4);\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      goto ON_EXIT;\r
-    }\r
   }\r
   }\r
-  \r
-ON_EXIT:\r
+\r
+  //\r
+  // Reconfigure the UDP instance with the default configuration.\r
+  //\r
   if (Mode->UsingIpv6) {\r
     Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);\r
   } else {\r
   if (Mode->UsingIpv6) {\r
     Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);\r
   } else {\r
@@ -690,9 +684,7 @@ EfiPxeBcDiscover (
       }\r
   }\r
 \r
       }\r
   }\r
 \r
-  if (EFI_ERROR (Status)) {\r
-    goto ON_EXIT;\r
-  } else {\r
+  if (!EFI_ERROR (Status)) {\r
     //\r
     // Parse the cached PXE reply packet, and store it into mode data if valid.\r
     //\r
     //\r
     // Parse the cached PXE reply packet, and store it into mode data if valid.\r
     //\r
@@ -964,11 +956,9 @@ EfiPxeBcMtftp (
     Mode->IcmpErrorReceived = TRUE;\r
   }\r
 \r
     Mode->IcmpErrorReceived = TRUE;\r
   }\r
 \r
-  if (EFI_ERROR (Status)) {\r
-    goto ON_EXIT;\r
-  }\r
-  \r
-ON_EXIT:\r
+  //\r
+  // Reconfigure the UDP instance with the default configuration.\r
+  //\r
   if (Mode->UsingIpv6) {\r
     Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);\r
   } else {\r
   if (Mode->UsingIpv6) {\r
     Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);\r
   } else {\r
index f918d6a29893e1fc24e0e566bde06f86820e852c..e6fb01ca716d5bf0521158dad11fd494df3e3d8c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support functions implementation for UefiPxeBc Driver.\r
 \r
 /** @file\r
   Support functions implementation for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -59,10 +59,6 @@ PxeBcFlushStaionIp (
     }\r
 \r
     Status = Private->Ip6->Receive (Private->Ip6, &Private->Icmp6Token);\r
     }\r
 \r
     Status = Private->Ip6->Receive (Private->Ip6, &Private->Icmp6Token);\r
-    if (EFI_ERROR (Status)) {\r
-      goto ON_EXIT;\r
-    }\r
-\r
   } else {\r
     ASSERT (SubnetMask != NULL);\r
     CopyMem (&Private->Udp4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS));\r
   } else {\r
     ASSERT (SubnetMask != NULL);\r
     CopyMem (&Private->Udp4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS));\r
@@ -82,10 +78,6 @@ PxeBcFlushStaionIp (
     }\r
 \r
     Status = Private->Ip4->Receive (Private->Ip4, &Private->IcmpToken);\r
     }\r
 \r
     Status = Private->Ip4->Receive (Private->Ip4, &Private->IcmpToken);\r
-    if (EFI_ERROR (Status)) {\r
-      goto ON_EXIT;\r
-    }\r
-\r
   }\r
 \r
 ON_EXIT:\r
   }\r
 \r
 ON_EXIT:\r