summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-06-12 15:03:11 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-12 15:35:27 +0200
commit0eb2c5dab2f9ed61c86cafe96363cee1936ae552 (patch)
tree2c4d4d38f62723bf00411a320ec7d9cee87ee896
parentc663678b26aed636e13b56ab8a220791e268f244 (diff)
gsm0503_interleaving: Mark input arguments as 'const *'
The interleaving/deinterleaving functions were missing 'const' qualifiers on their input data buffers Change-Id: I2118c34a6353167787b23f877f1d81d60151aaf9
-rw-r--r--include/osmocom/coding/gsm0503_interleaving.h10
-rw-r--r--src/coding/gsm0503_interleaving.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/include/osmocom/coding/gsm0503_interleaving.h b/include/osmocom/coding/gsm0503_interleaving.h
index 85c7328b..a5d25ed5 100644
--- a/include/osmocom/coding/gsm0503_interleaving.h
+++ b/include/osmocom/coding/gsm0503_interleaving.h
@@ -11,13 +11,13 @@
*/
void gsm0503_xcch_deinterleave(sbit_t *cB, const sbit_t *iB);
-void gsm0503_xcch_interleave(ubit_t *cB, ubit_t *iB);
+void gsm0503_xcch_interleave(const ubit_t *cB, ubit_t *iB);
-void gsm0503_tch_fr_deinterleave(sbit_t *cB, sbit_t *iB);
-void gsm0503_tch_fr_interleave(ubit_t *cB, ubit_t *iB);
+void gsm0503_tch_fr_deinterleave(sbit_t *cB, const sbit_t *iB);
+void gsm0503_tch_fr_interleave(const ubit_t *cB, ubit_t *iB);
-void gsm0503_tch_hr_deinterleave(sbit_t *cB, sbit_t *iB);
-void gsm0503_tch_hr_interleave(ubit_t *cB, ubit_t *iB);
+void gsm0503_tch_hr_deinterleave(sbit_t *cB, const sbit_t *iB);
+void gsm0503_tch_hr_interleave(const ubit_t *cB, ubit_t *iB);
void gsm0503_mcs1_ul_deinterleave(sbit_t *hc, sbit_t *dc, const sbit_t *iB);
void gsm0503_mcs1_ul_interleave(const ubit_t *hc,
diff --git a/src/coding/gsm0503_interleaving.c b/src/coding/gsm0503_interleaving.c
index 61d4fdc6..cd47cffc 100644
--- a/src/coding/gsm0503_interleaving.c
+++ b/src/coding/gsm0503_interleaving.c
@@ -76,7 +76,7 @@ void gsm0503_xcch_deinterleave(sbit_t *cB, const sbit_t *iB)
/*! \brief Interleave burst bits according to TS 05.03 4.1.4
* \param[out] iB caller-allocated output buffer for 456 soft interleaved bits
* \param[in] cB 456 soft input coded bits */
-void gsm0503_xcch_interleave(ubit_t *cB, ubit_t *iB)
+void gsm0503_xcch_interleave(const ubit_t *cB, ubit_t *iB)
{
int j, k, B;
@@ -608,7 +608,7 @@ void gsm0503_mcs8_dl_deinterleave(sbit_t *hc, sbit_t *c1, sbit_t *c2,
/*! \brief GSM TCH FR/EFR/AFS De-Interleaving and burst mapping
* \param[out] cB caller-allocated buffer for 456 unpacked output bits
* \param[in] iB 456 unpacked interleaved input bits */
-void gsm0503_tch_fr_deinterleave(sbit_t *cB, sbit_t *iB)
+void gsm0503_tch_fr_deinterleave(sbit_t *cB, const sbit_t *iB)
{
int j, k, B;
@@ -622,7 +622,7 @@ void gsm0503_tch_fr_deinterleave(sbit_t *cB, sbit_t *iB)
/*! \brief GSM TCH FR/EFR/AFS Interleaving and burst mapping
* \param[in] cB caller-allocated buffer for 456 unpacked input bits
* \param[out] iB 456 unpacked interleaved output bits */
-void gsm0503_tch_fr_interleave(ubit_t *cB, ubit_t *iB)
+void gsm0503_tch_fr_interleave(const ubit_t *cB, ubit_t *iB)
{
int j, k, B;
@@ -660,7 +660,7 @@ void gsm0503_tch_fr_interleave(ubit_t *cB, ubit_t *iB)
/*! \brief GSM TCH HR/AHS De-Interleaving and burst mapping
* \param[out] cB caller-allocated buffer for 228 unpacked output bits
* \param[in] iB 228 unpacked interleaved input bits */
-void gsm0503_tch_hr_deinterleave(sbit_t *cB, sbit_t *iB)
+void gsm0503_tch_hr_deinterleave(sbit_t *cB, const sbit_t *iB)
{
int j, k, B;
@@ -674,7 +674,7 @@ void gsm0503_tch_hr_deinterleave(sbit_t *cB, sbit_t *iB)
/*! \brief GSM TCH HR/AHS Interleaving and burst mapping
* \param[in] cB caller-allocated buffer for 228 unpacked input bits
* \param[out] iB 228 unpacked interleaved output bits */
-void gsm0503_tch_hr_interleave(ubit_t *cB, ubit_t *iB)
+void gsm0503_tch_hr_interleave(const ubit_t *cB, ubit_t *iB)
{
int j, k, B;