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 <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-Comment-Date: Tue, 29 Jun 2021 14:43:13 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
