aboutsummaryrefslogtreecommitdiffstats
path: root/tests/llist
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-21 12:05:30 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-24 12:23:50 +0200
commitaf387e2199de698fab9f180d68923c65b819be0c (patch)
treed40da4e5f6bc7cdd4ec21f9b9a0221307dffab70 /tests/llist
parent444bc82081be0fd371805017a4c97b01cb41c15d (diff)
llist: Add missing const qualifier in llist cast method
The missing const qualifier prevents the llist_empty() C++ wrapper function from being compiled successfully when it is used. Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/llist')
-rw-r--r--tests/llist/LListTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/llist/LListTest.cpp b/tests/llist/LListTest.cpp
index 04f741c..7c4975e 100644
--- a/tests/llist/LListTest.cpp
+++ b/tests/llist/LListTest.cpp
@@ -48,10 +48,14 @@ static void test_linux_list()
printf("=== start %s ===\n", __func__);
+ OSMO_ASSERT(llist_empty(&elems));
+
llist_add_tail(&elem1.list, &elems);
llist_add_tail(&elem2.list, &elems);
llist_add_tail(&elem3.list, &elems);
+ OSMO_ASSERT(!llist_empty(&elems));
+
llist_for_each(pos, &elems) {
count += 1;
printf(" %i -> %s\n", count, pos->entry()->str);