aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-02-15 20:16:07 +0100
committerHarald Welte <laforge@gnumonks.org>2016-02-15 20:16:07 +0100
commit94bb3769f36c8b64c5dc196f02f22994543997d2 (patch)
treee34735ab520d9c35074eb3f7809e37bdca7ee67c
parente81cc6a158688360679402c5c11067b6a234bdfa (diff)
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).
-rw-r--r--src/common/scheduler.c2
1 files changed, 1 insertions, 1 deletions
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;