mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-22 16:16:55 +08:00
Fix two -Wconversion warnings
This commit is contained in:
@@ -1887,7 +1887,7 @@ tcp_parseopt(struct tcp_pcb *pcb)
|
||||
return;
|
||||
}
|
||||
/* An MSS option with the right option length. */
|
||||
mss = (tcp_getoptbyte() << 8);
|
||||
mss = (u16_t)(tcp_getoptbyte() << 8);
|
||||
mss |= tcp_getoptbyte();
|
||||
/* Limit the mss to the configured TCP_MSS and prevent division by zero */
|
||||
pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss;
|
||||
|
||||
Reference in New Issue
Block a user