From 19c25725606b848986f29bb3a216857146fdacb9 Mon Sep 17 00:00:00 2001 From: Nagaraj Hegde Date: Mon, 4 Apr 2016 18:09:28 +0800 Subject: NetworkPkg:HttpDxe:Consume DxeHttpLib API changes HttpGenRequestString is updated to HttpGenRequestMessage, with an additional argument. This patch updates the caller of the DxeHttpLib API. Also, we will avoid adding any '\0' to the string, which was added to make AsciiStrLen to work on the string. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Nagaraj Hegde Reviewed-by: Fu Siyuan Reviewed-by: Samer El-Haj-Mahmoud --- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'NetworkPkg/HttpUtilitiesDxe') diff --git a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c index 739d3b753c..645fca4084 100644 --- a/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c +++ b/NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesProtocol.c @@ -207,11 +207,6 @@ HttpUtilitiesBuild ( StrLength = sizeof("\r\n") - 1; *NewMessageSize += StrLength; - // - // Final 0 for end flag - // - *NewMessageSize += 1; - *NewMessage = AllocateZeroPool (*NewMessageSize); if (*NewMessage == NULL) { Status = EFI_OUT_OF_RESOURCES; @@ -243,9 +238,7 @@ HttpUtilitiesBuild ( CopyMem (NewMessagePtr, "\r\n", StrLength); NewMessagePtr += StrLength; - *NewMessagePtr = 0; - - ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage) + 1); + ASSERT (*NewMessageSize == (UINTN)NewMessagePtr - (UINTN)(*NewMessage)); // // Free allocated buffer -- cgit v1.2.3