From ac9e758f413f029bdd454c22cf9bd84574e19453 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 6 May 2009 17:30:18 +0000 Subject: [PATCH] Patch #6823: tcp_in.c - small optimization --- src/core/tcp_in.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index c493f53d..dad16bc6 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -169,8 +169,8 @@ tcp_input(struct pbuf *p, struct netif *inp) ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); - flags = TCPH_FLAGS(tcphdr) & TCP_FLAGS; - tcplen = p->tot_len + ((flags & TCP_FIN || flags & TCP_SYN)? 1: 0); + flags = TCPH_FLAGS(tcphdr); + tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */