]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c
refine the code and add more security check.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Dispatcher.c
index 2b924c4b4b954fe80901729fb0e191e545759444..664d25a1a2aa4c03afb544daaf280e161f4cbc4e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Tcp request dispatcher implementation.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
+Copyright (c) 2005 - 2010, 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
@@ -52,7 +52,7 @@ Tcp4Route (
               RouteInfo->SubnetMask,\r
               RouteInfo->GatewayAddress\r
               );\r
-              \r
+\r
 }\r
 \r
 \r
@@ -249,7 +249,7 @@ Tcp4FlushPcb (
   Attach a Pcb to the socket.\r
 \r
   @param  Sk                     Pointer to the socket of this TCP instance.\r
-  \r
+\r
   @retval EFI_SUCCESS            The operation is completed successfully.\r
   @retval EFI_OUT_OF_RESOURCES   Failed due to resource limit.\r
 \r
@@ -300,7 +300,7 @@ Tcp4AttachPcb (
   Detach the Pcb of the socket.\r
 \r
   @param  Sk                     Pointer to the socket of this TCP instance.\r
-  \r
+\r
 **/\r
 VOID\r
 Tcp4DetachPcb (\r
@@ -532,15 +532,15 @@ Tcp4ConfigurePcb (
                             (UINT32) (Option->ConnectionTimeout * TCP_TICK_HZ)\r
                             );\r
 \r
-    if (Option->EnableNagle == FALSE) {\r
+    if (!Option->EnableNagle) {\r
       TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_NO_NAGLE);\r
     }\r
 \r
-    if (Option->EnableTimeStamp == FALSE) {\r
+    if (!Option->EnableTimeStamp) {\r
       TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_NO_TS);\r
     }\r
 \r
-    if (Option->EnableWindowScaling == FALSE) {\r
+    if (!Option->EnableWindowScaling) {\r
       TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_NO_WS);\r
     }\r
   }\r
@@ -557,7 +557,7 @@ Tcp4ConfigurePcb (
   //\r
   // update state of Tcb and socket\r
   //\r
-  if (CfgData->AccessPoint.ActiveFlag == FALSE) {\r
+  if (!CfgData->AccessPoint.ActiveFlag) {\r
 \r
     TcpSetState (Tcb, TCP_LISTEN);\r
     SockSetState (Sk, SO_LISTENING);\r