This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10846 )
Change subject: CBCH: Use llist_first_entry_or_null() instead of reinventing it
......................................................................
CBCH: Use llist_first_entry_or_null() instead of reinventing it
Change-Id: I376111e71d1c7be35a8fd7e392488adc34e21941
---
M src/common/cbch.c
1 file changed, 2 insertions(+), 4 deletions(-)
Approvals:
Harald Welte: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/cbch.c b/src/common/cbch.c
index b8f69c6..56d76f1 100644
--- a/src/common/cbch.c
+++ b/src/common/cbch.c
@@ -144,12 +144,10 @@
{
struct smscb_msg *msg;
- if (llist_empty(&bts->smscb_state.queue))
+ msg = llist_first_entry_or_null(&bts->smscb_state.queue, struct smscb_msg, list);
+ if (!msg)
return NULL;
- msg = llist_entry(bts->smscb_state.queue.next,
- struct smscb_msg, list);
-
llist_del(&msg->list);
return msg;
--
To view, visit https://gerrit.osmocom.org/10846
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I376111e71d1c7be35a8fd7e392488adc34e21941
Gerrit-Change-Number: 10846
Gerrit-PatchSet: 4
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180909/942e9965/attachment.htm>