summaryrefslogtreecommitdiffstats
path: root/src/coding
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-12-28 17:06:30 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-05 10:12:35 +0000
commite1a511b0319bc2d8fc271aaee52d3a8ce2acf1e1 (patch)
tree44afbccb9494ca9543be3a435fc3381b0aa4481e /src/coding
parent2f153b5020f4f15784b57e0aabb72fc2085b2448 (diff)
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
Diffstat (limited to 'src/coding')
-rw-r--r--src/coding/gsm0503_mapping.c9
1 files changed, 2 insertions, 7 deletions
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;
}
}