Bj??rn Ketelaars([email protected]) on 2020.01.27 20:53:52 +0100:
> Replace custom TAILQ concatenation loop by TAILQ_CONCAT(3).
>
> Comments/OK?
reads ok benno@
> diff --git usr.sbin/snmpd/control.c usr.sbin/snmpd/control.c
> index 54b58bbb7b6..dda18c1bad5 100644
> --- usr.sbin/snmpd/control.c
> +++ usr.sbin/snmpd/control.c
> @@ -487,10 +487,7 @@ control_dispatch_agentx(int fd, short event, void *arg)
> TAILQ_INSERT_TAIL(&oids, miboid, o_list);
> } while (++oid.bo_id[rhdr.subrange] <= ubound);
>
> - while ((miboid = TAILQ_FIRST(&oids)) != NULL) {
> - TAILQ_REMOVE(&oids, miboid, o_list);
> - TAILQ_INSERT_TAIL(&c->oids, miboid, o_list);
> - }
> + TAILQ_CONCAT(&c->oids, &oids, o_list);
> dodone:
> break;
> }
>