From 94bb3769f36c8b64c5dc196f02f22994543997d2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 15 Feb 2016 20:16:07 +0100 Subject: scheduler: Fix ARRAY_SIZE() in trx_sched_init() We want the size of the array, not of the pointer to the array. Found by coverity (CID 1351422). --- src/common/scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/scheduler.c b/src/common/scheduler.c index a8e5154d..e9d2423a 100644 --- a/src/common/scheduler.c +++ b/src/common/scheduler.c @@ -149,7 +149,7 @@ int trx_sched_init(struct l1sched_trx *l1t, struct gsm_bts_trx *trx) l1ts->mf_index = 0; l1ts->mf_last_fn = 0; INIT_LLIST_HEAD(&l1ts->dl_prims); - for (i = 0; i < ARRAY_SIZE(&l1ts->chan_state); i++) { + for (i = 0; i < ARRAY_SIZE(l1ts->chan_state); i++) { struct l1sched_chan_state *chan_state; chan_state = &l1ts->chan_state[i]; chan_state->active = 0; -- cgit v1.2.3