]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c
Code clean up in NetLib:
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Input.c
index 14887a6ba2d3e8c8e4330ee842ce428a3e24696f..9bea6b298b5ab5f1f7dbf3817efa06d6df033082 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   TCP input process routines.\r
 \r
-Copyright (c) 2005 - 2007, Intel Corporation<BR>\r
+Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -496,7 +496,7 @@ TcpDeliverData (
       TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_ACK_NOW);\r
     }\r
 \r
-    if (Nbuf->TotalSize) {\r
+    if (Nbuf->TotalSize != 0) {\r
       Urgent = 0;\r
 \r
       if (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_RCVD_URG) &&\r
@@ -799,7 +799,7 @@ TcpInput (
       Tcb     = TcpCloneTcb (Parent);\r
       if (Tcb == NULL) {\r
         DEBUG ((EFI_D_ERROR, "TcpInput: discard a segment because"\r
-          "failed to clone a child for TCB%x\n", Tcb));\r
+          " failed to clone a child for TCB%x\n", Tcb));\r
 \r
         goto DISCARD;\r
       }\r
@@ -1353,7 +1353,7 @@ StepSix:
 \r
   if ((Tcb->State != TCP_CLOSED) &&\r
       (TcpToSendData (Tcb, 0) == 0) &&\r
-      (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_ACK_NOW) || Nbuf->TotalSize)) {\r
+      (TCP_FLG_ON (Tcb->CtrlFlag, TCP_CTRL_ACK_NOW) || (Nbuf->TotalSize != 0))) {\r
 \r
     TcpToSendAck (Tcb);\r
   }\r
@@ -1407,7 +1407,7 @@ DISCARD:
 VOID\r
 TcpIcmpInput (\r
   IN NET_BUF     *Nbuf,\r
-  IN ICMP_ERROR  IcmpErr,\r
+  IN UINT8       IcmpErr,\r
   IN UINT32      Src,\r
   IN UINT32      Dst\r
   )\r
@@ -1441,7 +1441,12 @@ TcpIcmpInput (
     goto CLEAN_EXIT;\r
   }\r
 \r
-  IcmpErrStatus = IpIoGetIcmpErrStatus (IcmpErr, &IcmpErrIsHard, &IcmpErrNotify);\r
+  IcmpErrStatus = IpIoGetIcmpErrStatus (\r
+                    IcmpErr,\r
+                    IP_VERSION_4,\r
+                    &IcmpErrIsHard,\r
+                    &IcmpErrNotify\r
+                    );\r
 \r
   if (IcmpErrNotify) {\r
 \r