From b9fcb85a295cf02b42ac904ea582fcd496aa8480 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 5 Nov 2021 17:29:13 +0300 Subject: oml: use ARRAY_SIZE() in oml_rx_set_bts_attr() Change-Id: I89dab55e39fe49c8b4d3afb4b46d1b7f2bf3663c --- src/common/oml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/oml.c b/src/common/oml.c index 30caad51..a434ad30 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -598,7 +598,7 @@ static int oml_rx_set_bts_attr(struct gsm_bts *bts, struct msgb *msg) /* 9.4.25 Interference Level Boundaries */ if (TLVP_PRES_LEN(&tp, NM_ATT_INTERF_BOUND, 6)) { payload = TLVP_VAL(&tp, NM_ATT_INTERF_BOUND); - for (i = 0; i < 6; i++) { + for (i = 0; i < ARRAY_SIZE(bts->interference.boundary); i++) { const int16_t boundary = payload[i]; bts->interference.boundary[i] = -1 * boundary; } -- cgit v1.2.3