diff options
author | Harald Welte <laforge@osmocom.org> | 2020-03-07 10:18:18 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-03-07 10:18:18 +0100 |
commit | ee26ba6e600f2c72e832889171f927aa1e3cc4c1 (patch) | |
tree | 293b6f2acc6b30ed9b0eaf41eee7e2675f6a36b6 /src/host | |
parent | 0c77a7f4cf2ff9f8b045ff7dac45bedcccbad07d (diff) |
cosmetic: Use INIT_LLIST_HEAD() and llist_add_tail()
... instead of manually re-inventing them.
Change-Id: I7e0810aa7fd1daa8f9f3e46a207589a4c6da836b
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/virt_phy/src/virt_l1_sched_simple.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/host/virt_phy/src/virt_l1_sched_simple.c b/src/host/virt_phy/src/virt_l1_sched_simple.c index 4737135c..a14a1153 100644 --- a/src/host/virt_phy/src/virt_l1_sched_simple.c +++ b/src/host/virt_phy/src/virt_l1_sched_simple.c @@ -129,12 +129,8 @@ void virt_l1_sched_schedule(struct l1_model_ms *ms, struct msgb *msg, uint32_t f /* list did not contain mframe item with needed fn */ mi_fn = talloc_zero(ms, struct virt_l1_sched_mframe_item); mi_fn->fn = fn; - /* need to manually init the struct content.... no so happy */ - mi_fn->tdma_item_list.prev = &mi_fn->tdma_item_list; - mi_fn->tdma_item_list.next = &mi_fn->tdma_item_list; - - /* TODO: check if we get an error if list is empty... */ - llist_add(&mi_fn->mframe_item_entry, mi_next->mframe_item_entry.prev); + INIT_LLIST_HEAD(&mi_fn->tdma_item_list); + llist_add_tail(&mi_fn->mframe_item_entry, &mi_next->mframe_item_entry); } ti_new = talloc_zero(mi_fn, struct virt_l1_sched_tdma_item); |