diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-01-11 00:42:46 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-01-21 01:18:02 +0100 |
commit | 30ffa7ade5aa55e95cf888bbdd9028f2983d663c (patch) | |
tree | 5d3d61e238e7d8cf510285e04170e0de2592fddb | |
parent | c9fa25e8316b8af3e9f11b9e79368092df466972 (diff) |
undup: subchan_demux.c: use libosmocore's llist_count()
Depends on libosmocore Change-Id Ic49adc7a346f5722bf624d7d3b4a735e4220ae15
Change-Id: I47f1831f1835dc07925dabbc115677087e48fa1b
-rw-r--r-- | src/subchan_demux.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/subchan_demux.c b/src/subchan_demux.c index f965490..238056c 100644 --- a/src/subchan_demux.c +++ b/src/subchan_demux.c @@ -289,17 +289,6 @@ int subchan_mux_out(struct subch_mux *mx, uint8_t *data, int len) return i; } -static int llist_len(struct llist_head *head) -{ - struct llist_head *entry; - int i = 0; - - llist_for_each(entry, head) - i++; - - return i; -} - /* evict the 'num_evict' number of oldest entries in the queue */ static void tx_queue_evict(struct mux_subch *sch, int num_evict) { @@ -327,7 +316,7 @@ int subchan_mux_enqueue(struct subch_mux *mx, int s_nr, const uint8_t *data, int len) { struct mux_subch *sch = &mx->subch[s_nr]; - int list_len = llist_len(&sch->tx_queue); + unsigned int list_len = llist_count(&sch->tx_queue); struct subch_txq_entry *tqe = talloc_zero_size(tall_tqe_ctx, sizeof(*tqe) + len); if (!tqe) |