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?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32579
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1ce894da39e3f2329c88666a5dda594b8bce4228
Gerrit-Change-Number: 32579
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Comment-Date: Wed, 03 May 2023 13:18:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <[email protected]>
Gerrit-MessageType: comment

Reply via email to