]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c
1. Add DPC protocol and DpcLib library in MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Option.c
index b81f442a6fc3fc36080f6835e8a121396c9e0d39..af1de48b975bac5d1886e3adf91a9a8afea62b90 100644 (file)
@@ -250,7 +250,7 @@ TcpParseOption (
 \r
   Option->Flag  = 0;\r
 \r
-  TotalLen      = (Tcp->HeadLen << 2) - sizeof (TCP_HEAD);\r
+  TotalLen      = (UINT8) ((Tcp->HeadLen << 2) - sizeof (TCP_HEAD));\r
   if (TotalLen <= 0) {\r
     return 0;\r
   }\r
@@ -303,7 +303,7 @@ TcpParseOption (
         return -1;\r
       }\r
 \r
-      Option->WndScale = (UINT8) NET_MIN (14, Head[Cur + 2]);\r
+      Option->WndScale = (UINT8) MIN (14, Head[Cur + 2]);\r
       TCP_SET_FLG (Option->Flag, TCP_OPTION_RCVD_WS);\r
 \r
       Cur += TCP_OPTION_WS_LEN;\r