mirror of
https://github.com/skeeto/endlessh.git
synced 2026-01-08 03:10:34 -08:00
Add note about queue_remove()
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user