fixed bug #33398 (pointless conversion when checking TCP port range)

This commit is contained in:
goldsimon 2011-12-05 20:58:51 +01:00
parent f3c1686a40
commit 8b06c61a70
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,8 @@ HISTORY
++ Bugfixes:
2011-05-25: Simon Goldschmidt
* tcp.c: fixed bug #33398 (pointless conversion when checking TCP port range)

View File

@ -619,7 +619,7 @@ tcp_new_port(void)
static u16_t port = TCP_LOCAL_PORT_RANGE_START;
again:
if (port++ >= TCP_LOCAL_PORT_RANGE_END) {
if (port++ == TCP_LOCAL_PORT_RANGE_END) {
port = TCP_LOCAL_PORT_RANGE_START;
}
/* Check all PCB lists. */