Add note about queue_remove()

This commit is contained in:
Christopher Wellons 2019-02-03 10:06:12 -05:00
parent d5726be23d
commit 3a0126bd99

View File

@ -124,6 +124,9 @@ queue_init(struct queue *q)
static struct client *
queue_remove(struct queue *q, int fd)
{
/* Yes, this is a linear search, but the element we're looking for
* is virtually always one of the first few elements.
*/
struct client *c;
struct client **prev = &q->head;
for (c = q->head; c; prev = &c->next, c = c->next) {