diff options
author | Max <msuraev@sysmocom.de> | 2016-10-14 13:16:35 +0200 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2016-10-24 08:43:30 +0000 |
commit | 5a4f4d12e14c23073644a3717f62949bc822db1f (patch) | |
tree | 38a32b68f66aebe19330c2a5526c75d130ceed50 /src | |
parent | c22da59342ed239b5dff4b6572dfcf45c634b251 (diff) |
DTX HR - fix array size calculation
Use ARRAY_SIZE macro for each pointer separately.
Fix suggested by Neels Hofmeyr <nhofmeyr@sysmocom.de>.
Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b
Fixes: Coverity CID 150132
Diffstat (limited to 'src')
-rw-r--r-- | src/common/msg_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |