From e1a511b0319bc2d8fc271aaee52d3a8ce2acf1e1 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 28 Dec 2017 17:06:30 +0100 Subject: coding: move eB adjustement to appropriate place As a leftover from code move from OsmoBTS we have eB adjustement outside of eB check in gsm0503_tch_burst_map() which is rightfully noted by Coverity. Let's fix this by moving the adjustement under the corresponding if. Change-Id: I385cd6ffea4d13ef911910fc87c92b73809888a2 Fixes: CID57691 --- src/coding/gsm0503_mapping.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/coding/gsm0503_mapping.c') diff --git a/src/coding/gsm0503_mapping.c b/src/coding/gsm0503_mapping.c index 1e37fce0..f7532eb2 100644 --- a/src/coding/gsm0503_mapping.c +++ b/src/coding/gsm0503_mapping.c @@ -92,13 +92,8 @@ void gsm0503_tch_burst_map(const ubit_t *iB, ubit_t *eB, const ubit_t *h, int od eB[i] = iB[i]; for (i = 58 - odd; i < 114; i += 2) eB[i + 2] = iB[i]; - } - - if (h) { - if (!odd) - eB[58] = *h; - else - eB[57] = *h; + if (h) + eB[odd ? 57 : 58] = *h; } } -- cgit v1.2.3