public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Wang Fan <fan.wang@intel.com>, Ye Ting <ting.ye@intel.com>,
	Fu Siyuan <siyuan.fu@intel.com>, Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch 2/2] NetworkPkg/HttpDxe: Remove the unnecessary ASSERT.
Date: Tue, 26 Dec 2017 14:35:14 +0800	[thread overview]
Message-ID: <1514270114-5776-3-git-send-email-jiaxin.wu@intel.com> (raw)
In-Reply-To: <1514270114-5776-1-git-send-email-jiaxin.wu@intel.com>

Cc: Wang Fan <fan.wang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 NetworkPkg/HttpDxe/HttpImpl.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index fe1c3b7..b3a64cf 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -63,11 +63,10 @@ EfiHttpGetModeData (
   if ((This == NULL) || (HttpConfigData == NULL)) {
     return EFI_INVALID_PARAMETER;
   }
 
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
-  ASSERT (HttpInstance != NULL);
 
   if ((HttpConfigData->AccessPoint.IPv6Node == NULL) ||
       (HttpConfigData->AccessPoint.IPv4Node == NULL)) {
     return EFI_INVALID_PARAMETER;
   }
@@ -147,11 +146,11 @@ EfiHttpConfigure (
         (!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)))) {
     return EFI_INVALID_PARAMETER;
   }
 
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
-  ASSERT (HttpInstance != NULL && HttpInstance->Service != NULL);
+  ASSERT (HttpInstance->Service != NULL);
 
   if (HttpConfigData != NULL) {
 
     if (HttpConfigData->HttpVersion >= HttpVersionUnsupported) {
       return EFI_UNSUPPORTED;
@@ -289,11 +288,10 @@ EfiHttpRequest (
       (Request->Method != HttpMethodPost) && (Request->Method != HttpMethodPatch)) {
     return EFI_UNSUPPORTED;
   }
 
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
-  ASSERT (HttpInstance != NULL);
 
   //
   // Capture the method into HttpInstance.
   //
   if (Request != NULL) {
@@ -623,12 +621,10 @@ EfiHttpRequest (
 
   if (EFI_ERROR (Status) || NULL == RequestMsg) {
     goto Error3;
   }
 
-  ASSERT (RequestMsg != NULL);
-
   //
   // Every request we insert a TxToken and a response call would remove the TxToken.
   // In cases of PUT/POST/PATCH, after an initial request-response pair, we would do a
   // continuous request without a response call. So, in such cases, where Request
   // structure is NULL, we would not insert a TxToken.
@@ -885,11 +881,10 @@ EfiHttpCancel (
   if (This == NULL) {
     return EFI_INVALID_PARAMETER;
   }
 
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
-  ASSERT (HttpInstance != NULL);
 
   if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
     return EFI_NOT_STARTED;
   }
 
@@ -1543,11 +1538,10 @@ EfiHttpResponse (
   if (HttpMsg == NULL) {
     return EFI_INVALID_PARAMETER;
   }
   
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
-  ASSERT (HttpInstance != NULL);
 
   if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
     return EFI_NOT_STARTED;
   }
 
@@ -1639,11 +1633,10 @@ EfiHttpPoll (
   if (This == NULL) {
     return EFI_INVALID_PARAMETER;
   }
 
   HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
-  ASSERT (HttpInstance != NULL);
 
   if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
     return EFI_NOT_STARTED;
   }
   
-- 
1.9.5.msysgit.1



  parent reply	other threads:[~2017-12-26  6:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26  6:35 [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Jiaxin Wu
2017-12-26  6:35 ` [Patch 1/2] NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest() Jiaxin Wu
2017-12-26  6:35 ` Jiaxin Wu [this message]
2017-12-27  1:38 ` [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Fu, Siyuan
2017-12-27  2:16 ` Wang, Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1514270114-5776-3-git-send-email-jiaxin.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox