Fix two -Wconversion warnings

This commit is contained in:
Dirk Ziegelmeier
2017-07-15 10:25:19 +02:00
parent 3c371e4d52
commit 328134fdba
2 changed files with 2 additions and 2 deletions

View File

@@ -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;