small performance improvement

This commit is contained in:
jani 2003-11-14 12:20:27 +00:00
parent 23499a07d5
commit 3e1f7bd2fc

View File

@ -154,12 +154,12 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
seg->p = NULL; seg->p = NULL;
if (queue == NULL) { if (queue == NULL) {
queue = seg; useg = queue = seg;
} }
else { else {
/* Attach the segment to the end of the queued segments. */ /* Attach the segment to the end of the queued segments. */
for (useg = queue; useg->next != NULL; useg = useg->next);
useg->next = seg; useg->next = seg;
useg = seg;
} }
/* If copy is set, memory should be allocated /* If copy is set, memory should be allocated