Change in libosmocore[master]: linuxlist: add functions to check entry presence and list end

pespin gerrit-no-reply at lists.osmocom.org
Tue Jun 29 14:43:13 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/24801 )

Change subject: linuxlist: add functions to check entry presence and list end
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.osmocom.org/c/libosmocore/+/24801/1/include/osmocom/core/linuxlist.h 
File include/osmocom/core/linuxlist.h:

https://gerrit.osmocom.org/c/libosmocore/+/24801/1/include/osmocom/core/linuxlist.h@417 
PS1, Line 417: static inline bool llist_is_last(struct llist_head *head, struct llist_head *entry)
There's "#define llist_last_entry(ptr, type, member)" already defined above. 

So maybe simply define a "#define llist_last" too to keep APIs similar, and simply use in your app code:
if (&foobar->entry == llist_last(&xyz->list)) { ... }


https://gerrit.osmocom.org/c/libosmocore/+/24801/1/include/osmocom/core/linuxlist.h@419 
PS1, Line 419: 	if (entry == head->prev)
return (entry == head->prev);



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf455bf6ba9d60bd311af17c9e80febaa42cacc9
Gerrit-Change-Number: 24801
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 29 Jun 2021 14:43:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210629/8d9594d5/attachment.htm>


More information about the gerrit-log mailing list