<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/24801">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/24801/1/include/osmocom/core/linuxlist.h">File include/osmocom/core/linuxlist.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/24801/1/include/osmocom/core/linuxlist.h@417">Patch Set #1, Line 417:</a> <code style="font-family:monospace,monospace">static inline bool llist_is_last(struct llist_head *head, struct llist_head *entry)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">There's "#define llist_last_entry(ptr, type, member)" already defined above. </p><p style="white-space: pre-wrap; word-wrap: break-word;">So maybe simply define a "#define llist_last" too to keep APIs similar, and simply use in your app code:<br>if (&foobar->entry == llist_last(&xyz->list)) { ... }</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/24801/1/include/osmocom/core/linuxlist.h@419">Patch Set #1, Line 419:</a> <code style="font-family:monospace,monospace">        if (entry == head->prev)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">return (entry == head->prev);</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/24801">change 24801</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/24801"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Icf455bf6ba9d60bd311af17c9e80febaa42cacc9 </div>
<div style="display:none"> Gerrit-Change-Number: 24801 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 29 Jun 2021 14:43:13 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>