mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-20 23:26:56 +08:00
tcp_out: Fix oversize vs. space assertion test
oversize_used is always 0 at this point, should test oversize instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
(cherry picked from commit e1598b0b11)
This commit is contained in:
@@ -467,7 +467,7 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags)
|
||||
#endif /* TCP_OVERSIZE_DBGCHECK */
|
||||
oversize = pcb->unsent_oversize;
|
||||
if (oversize > 0) {
|
||||
LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space);
|
||||
LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space);
|
||||
seg = last_unsent;
|
||||
oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len));
|
||||
pos += oversize_used;
|
||||
|
||||
Reference in New Issue
Block a user