|
From: | address@hidden |
Subject: | Re: [lwip-users] TCP_SND_QUEUELEN vs TCP_SNDQUEUELEN_OVERFLOW |
Date: | Wed, 26 Mar 2008 19:47:23 +0100 |
User-agent: | Thunderbird 2.0.0.12 (Macintosh/20080213) |
Jonathan Larmour wrote:
Art R. wrote:Just trying to make lwIP as good as it can be. Don't know if you would consider this, but ... tcp.c (current 1.3.0) line 315: pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; line 995: pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS;
The thing I considered here was a check (in init.c?) that TCP_MSS != 0.
Both TCP_MSS and 536 are constants. The compare could be done at compile time in a #if rather than in compiled code at runtime.Every compiler would optimise away that expression.
Indeed! Simon
[Prev in Thread] | Current Thread | [Next in Thread] |