From bbe91e356f971c9a6300e36981fb03c803adc62e Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 15 Jan 2017 20:13:41 +0800 Subject: [PATCH] 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 (cherry picked from commit e1598b0b11431d6fd011f4eb1f5497413b3da515) --- src/core/tcp_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 8ccdffb9..4d39826c 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -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;