From 5a4f4d12e14c23073644a3717f62949bc822db1f Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 14 Oct 2016 13:16:35 +0200 Subject: DTX HR - fix array size calculation Use ARRAY_SIZE macro for each pointer separately. Fix suggested by Neels Hofmeyr . Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b Fixes: Coverity CID 150132 --- src/common/msg_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index f00a71ac..393ae908 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -260,7 +260,8 @@ static inline bool dtx_sched_optional(struct gsm_lchan *lchan, uint32_t fn) return fn_chk(f, fn, ARRAY_SIZE(f)); else return fn_chk(lchan->nr ? h1 : h0, fn, - ARRAY_SIZE(lchan->nr ? h1 : h0)); + lchan->nr ? ARRAY_SIZE(h1) : + ARRAY_SIZE(h0)); } return false; } -- cgit v1.2.3