From 0a51e1a33795559ef6baf5cd2afce288b8f9eba7 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 12 Dec 2013 17:31:02 +0100 Subject: sysmobts: Change the ARRAY_SIZE to a constant number The parameter "uint8_t mute_state[8]" is actually a "uint8_t *mute_state" so the ARRAY_SIZE is not what we think it is. Fixes: Coverity CID 1125885 --- src/osmo-bts-sysmo/oml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c index 395dcbc..27b108a 100644 --- a/src/osmo-bts-sysmo/oml.c +++ b/src/osmo-bts-sysmo/oml.c @@ -346,7 +346,7 @@ int oml_mo_rf_lock_chg(struct gsm_abis_mo *mo, uint8_t mute_state[8], int i; int is_locked = 1; - for (i = 0; i < ARRAY_SIZE(mute_state); ++i) + for (i = 0; i < 8; ++i) if (!mute_state[i]) is_locked = 0; -- cgit v1.2.3