mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-16 17:43:23 +00:00
Patch #6823: tcp_in.c - small optimization
This commit is contained in:
parent
518b18dad0
commit
ac9e758f41
@ -169,8 +169,8 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
ackno = tcphdr->ackno = ntohl(tcphdr->ackno);
|
ackno = tcphdr->ackno = ntohl(tcphdr->ackno);
|
||||||
tcphdr->wnd = ntohs(tcphdr->wnd);
|
tcphdr->wnd = ntohs(tcphdr->wnd);
|
||||||
|
|
||||||
flags = TCPH_FLAGS(tcphdr) & TCP_FLAGS;
|
flags = TCPH_FLAGS(tcphdr);
|
||||||
tcplen = p->tot_len + ((flags & TCP_FIN || flags & TCP_SYN)? 1: 0);
|
tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0);
|
||||||
|
|
||||||
/* Demultiplex an incoming segment. First, we check if it is destined
|
/* Demultiplex an incoming segment. First, we check if it is destined
|
||||||
for an active connection. */
|
for an active connection. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user