Attention is currently required from: pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32579 )
Change subject: select: speed up osmo_fd_is_registered ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
the iteartion is done precisely to avoid that kind of hacky checks whith assumptions regarding the c […]
Yes, but lets see if we can cause any harm with the check:
if fd->list.next is NULL, then the fd can not be registered, we return false. This can never be wrong. If there is a pointer in fd->list.next, even if it is just noise we have to go through the check, so everything is still fine.
If fd->list.next is LLIST_POISON1, then the fd also can not be registered, we return false. When fd->list.next is LLIST_POISON! by coincidence due to not initializing the list, the fd also cannot be registered.
I can not see any problem at the moment, other than the method is a bit hacky. Do you see a problem that I don't see here?