Download raw body.
dhcpd(8): make pollfd array slot handling more robust
On Sat, May 31, 2025 at 04:35:45PM +1000, David Gwynne wrote: > ive been working on a big change to dhcpd internals and hit a problem > where this code would get confused about which fd generated which event. > this simplifies the handling by storing the pfd index used by the event > sources to make it easy to marry them up after poll() returns. > > i think it's easier to read too. > > ok? ok > + if (fds[i].revents & (POLLIN | POLLHUP)) > + (*(l->handler))(l); I would get rid of this weird sigil soup idiom for calling a function pointer and simply do l->handler(l); which does the same thing and is a lot less ugly (there's at least one more of these in this file).
dhcpd(8): make pollfd array slot handling more robust