X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FUefiPxeBcDxe%2FPxeBcSupport.c;h=36b0665a96b888a9753ffa493d3c1b5d6d34a12e;hb=5b9a923529dfbbd3951e3a003238d8bfb4285dff;hp=6ddcac718ed93b71737ac7e02f9b5965f2e10ec5;hpb=129b8b096fa2f87a4b24f31c004dea7bfe7872dd;p=mirror_edk2.git
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c
index 6ddcac718e..36b0665a96 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c
@@ -1,7 +1,7 @@
/** @file
Support functions implementation for UefiPxeBc Driver.
- Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -28,7 +28,7 @@
**/
EFI_STATUS
-PxeBcFlushStaionIp (
+PxeBcFlushStationIp (
PXEBC_PRIVATE_DATA *Private,
EFI_IP_ADDRESS *StationIp,
EFI_IP_ADDRESS *SubnetMask OPTIONAL
@@ -59,10 +59,6 @@ PxeBcFlushStaionIp (
}
Status = Private->Ip6->Receive (Private->Ip6, &Private->Icmp6Token);
- if (EFI_ERROR (Status)) {
- goto ON_EXIT;
- }
-
} else {
ASSERT (SubnetMask != NULL);
CopyMem (&Private->Udp4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS));
@@ -82,10 +78,6 @@ PxeBcFlushStaionIp (
}
Status = Private->Ip4->Receive (Private->Ip4, &Private->IcmpToken);
- if (EFI_ERROR (Status)) {
- goto ON_EXIT;
- }
-
}
ON_EXIT:
@@ -1400,6 +1392,7 @@ PxeBcUintnToAscDecWithFormat (
@param[in] Number Numeric value to be converted.
@param[in] Buffer The pointer to the buffer for ASCII string.
+ @param[in] BufferSize The maxsize of the buffer.
@return Length The actual length of the ASCII string.
@@ -1407,7 +1400,8 @@ PxeBcUintnToAscDecWithFormat (
UINTN
PxeBcUintnToAscDec (
IN UINTN Number,
- IN UINT8 *Buffer
+ IN UINT8 *Buffer,
+ IN UINTN BufferSize
)
{
UINTN Index;
@@ -1423,7 +1417,7 @@ PxeBcUintnToAscDec (
Number = (UINTN) (Number / 10);
} while (Number != 0);
- AsciiStrCpy ((CHAR8 *) Buffer, &TempStr[Index]);
+ AsciiStrCpyS ((CHAR8 *) Buffer, BufferSize, &TempStr[Index]);
Length = AsciiStrLen ((CHAR8 *) Buffer);
@@ -1466,7 +1460,7 @@ PxeBcUniHexToUint8 (
}
/**
- Calculate the elapsed time
+ Calculate the elapsed time.
@param[in] Private The pointer to PXE private data