[PATCH] openbsc[master]: cosmetic: prepare for llist_first/_last in libosmocore

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Feb 15 00:20:43 UTC 2017


cosmetic: prepare for llist_first/_last in libosmocore

I would like to move the llist_first and llist_last macros from gtphub.c to
libosmocore with change-id I296b7cf1c7cb07b24c2e17084b03fed321c53a7c. To avoid
compiler warnings, encapsulate the gtphub.c definitions in an #ifndef.

Change-Id: I8afaad471eb38d897184ea53cb1f4d10850e35eb
---
M openbsc/src/gprs/gtphub.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/24/1824/2

diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c
index a1aaed2..88cf048 100644
--- a/openbsc/src/gprs/gtphub.c
+++ b/openbsc/src/gprs/gtphub.c
@@ -58,6 +58,7 @@
 typedef int (*osmo_fd_cb_t)(struct osmo_fd *fd, unsigned int what);
 
 /* TODO move this to osmocom/core/linuxlist.h ? */
+#ifndef __llist_first
 #define __llist_first(head) (((head)->next == (head)) ? NULL : (head)->next)
 #define llist_first(head, type, entry) \
 	llist_entry(__llist_first(head), type, entry)
@@ -65,6 +66,7 @@
 #define __llist_last(head) (((head)->next == (head)) ? NULL : (head)->prev)
 #define llist_last(head, type, entry) \
 	llist_entry(__llist_last(head), type, entry)
+#endif
 
 /* TODO move GTP header stuff to openggsn/gtp/ ? See gtp_decaps*() */
 

-- 
To view, visit https://gerrit.osmocom.org/1824
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8afaad471eb38d897184ea53cb1f4d10850e35eb
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list