summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Tcp4Dxe
diff options
context:
space:
mode:
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-30 13:44:11 +0000
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-30 13:44:11 +0000
commit1204fe8319e5e6f77df68c375ef403e9ffa9227e (patch)
tree0946ddf42875ba3243758f77097c06587727a6e1 /MdeModulePkg/Universal/Network/Tcp4Dxe
parent9ae650ef6ca9372199adb31fb3432ed8cde353ad (diff)
downloadedk2-1204fe8319e5e6f77df68c375ef403e9ffa9227e.zip
edk2-1204fe8319e5e6f77df68c375ef403e9ffa9227e.tar.gz
edk2-1204fe8319e5e6f77df68c375ef403e9ffa9227e.tar.bz2
Code clean up in NetLib:
1. Add GLOBAL_REMOVE_IF_UNREFERENCED to all globals 2. Update NTOHL and NTOHS to be BaseLib func SwapBytes32/SwapBytes16 3. Remove duplicate NET_SWAP_SHORT (to use NTOHS instead) git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9648 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Tcp4Dxe')
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c2
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c8
2 files changed, 7 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c
index b29e6cb..9bea6b2 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c
@@ -799,7 +799,7 @@ TcpInput (
Tcb = TcpCloneTcb (Parent);
if (Tcb == NULL) {
DEBUG ((EFI_D_ERROR, "TcpInput: discard a segment because"
- "failed to clone a child for TCB%x\n", Tcb));
+ " failed to clone a child for TCB%x\n", Tcb));
goto DISCARD;
}
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
index 8c0293d..0014fc9 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
@@ -1090,18 +1090,22 @@ TcpInstallDevicePath (
TCP_CB *Tcb;
IPv4_DEVICE_PATH Ip4DPathNode;
EFI_STATUS Status;
+ TCP_PORTNO LocalPort;
+ TCP_PORTNO RemotePort;
TcpProto = (TCP4_PROTO_DATA *) Sock->ProtoReserved;
TcpService = TcpProto->TcpService;
Tcb = TcpProto->TcpPcb;
+ LocalPort = NTOHS (Tcb->LocalEnd.Port);
+ RemotePort = NTOHS (Tcb->RemoteEnd.Port);
NetLibCreateIPv4DPathNode (
&Ip4DPathNode,
TcpService->ControllerHandle,
Tcb->LocalEnd.Ip,
- NTOHS (Tcb->LocalEnd.Port),
+ LocalPort,
Tcb->RemoteEnd.Ip,
- NTOHS (Tcb->RemoteEnd.Port),
+ RemotePort,
EFI_IP_PROTO_TCP,
Tcb->UseDefaultAddr
);