]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c
1. Add DPC protocol and DpcLib library in MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Dhcp4Dxe / Dhcp4Impl.c
index 69598f15c3c77b6199276916e45c5b44811d049f..e8e9b383f88d1f086e64e016dcaebe7fe81d4fab 100644 (file)
@@ -178,7 +178,7 @@ DhcpCopyConfigure (
     }\r
 \r
     for (Index = 0; Index < Src->DiscoverTryCount; Index++) {\r
-      Dst->DiscoverTimeout[Index] = NET_MAX (Src->DiscoverTimeout[Index], 1);\r
+      Dst->DiscoverTimeout[Index] = MAX (Src->DiscoverTimeout[Index], 1);\r
     }\r
   }\r
 \r
@@ -194,7 +194,7 @@ DhcpCopyConfigure (
     }\r
 \r
     for (Index = 0; Index < Src->RequestTryCount; Index++) {\r
-      Dst->RequestTimeout[Index] = NET_MAX (Src->RequestTimeout[Index], 1);\r
+      Dst->RequestTimeout[Index] = MAX (Src->RequestTimeout[Index], 1);\r
     }\r
   }\r
 \r
@@ -214,7 +214,7 @@ DhcpCopyConfigure (
     SrcOptions  = Src->OptionList;\r
 \r
     for (Index = 0; Index < Src->OptionCount; Index++) {\r
-      Len = sizeof (EFI_DHCP4_PACKET_OPTION) + NET_MAX (SrcOptions[Index]->Length - 1, 0);\r
+      Len = sizeof (EFI_DHCP4_PACKET_OPTION) + MAX (SrcOptions[Index]->Length - 1, 0);\r
 \r
       DstOptions[Index] = NetAllocatePool (Len);\r
 \r
@@ -819,7 +819,7 @@ Dhcp4ParseCheckOption (
   Parse = (DHCP_PARSE_CONTEXT *) Context;\r
   Parse->Index++;\r
 \r
-  if (Parse->Index < Parse->OptionCount) {\r
+  if (Parse->Index <= Parse->OptionCount) {\r
     //\r
     // Use _CR to get the memory position of EFI_DHCP4_PACKET_OPTION for\r
     // the EFI_DHCP4_PACKET_OPTION->Data because DhcpIterateOptions only\r