From 3e1f7bd2fc1d6039347c78d52ee8280a068fdb4b Mon Sep 17 00:00:00 2001 From: jani Date: Fri, 14 Nov 2003 12:20:27 +0000 Subject: [PATCH] small performance improvement --- src/core/tcp_out.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 5ec0dc09..3adab4c6 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -154,12 +154,12 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len, seg->p = NULL; if (queue == NULL) { - queue = seg; + useg = queue = seg; } else { /* Attach the segment to the end of the queued segments. */ - for (useg = queue; useg->next != NULL; useg = useg->next); useg->next = seg; + useg = seg; } /* If copy is set, memory should be allocated