mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-12-10 08:46:40 +08:00
small performance improvement
This commit is contained in:
parent
23499a07d5
commit
3e1f7bd2fc
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user