[PATCH] libosmocore[master]: gsm0503_{coding, mapping}: Mark input arguments as 'const'

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jun 12 07:47:43 UTC 2017


Review at  https://gerrit.osmocom.org/2882

gsm0503_{coding,mapping}: Mark input arguments as 'const'

It is generally our coding style to mark pointers to constant input data
as 'const *'.  For some reason the gsm0503 coding and mapping was not
adhering to this, so let's bring it into compliance.

Change-Id: Id8731d7ae6171dff94741b6ddbb95ab5f03bfd4e
---
M include/osmocom/coding/gsm0503_coding.h
M include/osmocom/coding/gsm0503_mapping.h
M src/coding/gsm0503_coding.c
M src/coding/gsm0503_mapping.c
4 files changed, 73 insertions(+), 74 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/82/2882/1

diff --git a/include/osmocom/coding/gsm0503_coding.h b/include/osmocom/coding/gsm0503_coding.h
index b8eb205..f6591f5 100644
--- a/include/osmocom/coding/gsm0503_coding.h
+++ b/include/osmocom/coding/gsm0503_coding.h
@@ -21,43 +21,43 @@
 	EGPRS_NUM_MCS,
 };
 
-int gsm0503_xcch_encode(ubit_t *bursts, uint8_t *l2_data);
-int gsm0503_xcch_decode(uint8_t *l2_data, sbit_t *bursts,
+int gsm0503_xcch_encode(ubit_t *bursts, const uint8_t *l2_data);
+int gsm0503_xcch_decode(uint8_t *l2_data, const sbit_t *bursts,
 	int *n_errors, int *n_bits_total);
 
-int gsm0503_pdtch_encode(ubit_t *bursts, uint8_t *l2_data, uint8_t l2_len);
-int gsm0503_pdtch_decode(uint8_t *l2_data, sbit_t *bursts, uint8_t *usf_p,
+int gsm0503_pdtch_encode(ubit_t *bursts, const uint8_t *l2_data, uint8_t l2_len);
+int gsm0503_pdtch_decode(uint8_t *l2_data, const sbit_t *bursts, uint8_t *usf_p,
 	int *n_errors, int *n_bits_total);
 
-int gsm0503_pdtch_egprs_encode(ubit_t *bursts, uint8_t *l2_data,
+int gsm0503_pdtch_egprs_encode(ubit_t *bursts, const uint8_t *l2_data,
 	uint8_t l2_len);
-int gsm0503_pdtch_egprs_decode(uint8_t *l2_data, sbit_t *bursts,
+int gsm0503_pdtch_egprs_decode(uint8_t *l2_data, const sbit_t *bursts,
 	uint16_t nbits, uint8_t *usf_p, int *n_errors, int *n_bits_total);
 
-int gsm0503_tch_fr_encode(ubit_t *bursts, uint8_t *tch_data, int len,
+int gsm0503_tch_fr_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
 	int net_order);
-int gsm0503_tch_fr_decode(uint8_t *tch_data, sbit_t *bursts, int net_order,
+int gsm0503_tch_fr_decode(uint8_t *tch_data, const sbit_t *bursts, int net_order,
 	int efr, int *n_errors, int *n_bits_total);
 
-int gsm0503_tch_hr_encode(ubit_t *bursts, uint8_t *tch_data, int len);
-int gsm0503_tch_hr_decode(uint8_t *tch_data, sbit_t *bursts, int odd,
+int gsm0503_tch_hr_encode(ubit_t *bursts, const uint8_t *tch_data, int len);
+int gsm0503_tch_hr_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
 	int *n_errors, int *n_bits_total);
 
-int gsm0503_tch_afs_encode(ubit_t *bursts, uint8_t *tch_data, int len,
+int gsm0503_tch_afs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft,
 	uint8_t cmr);
-int gsm0503_tch_afs_decode(uint8_t *tch_data, sbit_t *bursts,
+int gsm0503_tch_afs_decode(uint8_t *tch_data, const sbit_t *bursts,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft,
 	uint8_t *cmr, int *n_errors, int *n_bits_total);
 
-int gsm0503_tch_ahs_encode(ubit_t *bursts, uint8_t *tch_data, int len,
+int gsm0503_tch_ahs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft, uint8_t cmr);
-int gsm0503_tch_ahs_decode(uint8_t *tch_data, sbit_t *bursts, int odd,
+int gsm0503_tch_ahs_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft,
 	uint8_t *cmr, int *n_errors, int *n_bits_total);
 
-int gsm0503_rach_encode(ubit_t *burst, uint8_t *ra, uint8_t bsic);
-int gsm0503_rach_decode(uint8_t *ra, sbit_t *burst, uint8_t bsic);
+int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t bsic);
+int gsm0503_rach_decode(uint8_t *ra, const sbit_t *burst, uint8_t bsic);
 
-int gsm0503_sch_encode(ubit_t *burst, uint8_t *sb_info);
-int gsm0503_sch_decode(uint8_t *sb_info, sbit_t *burst);
+int gsm0503_sch_encode(ubit_t *burst, const uint8_t *sb_info);
+int gsm0503_sch_decode(uint8_t *sb_info, const sbit_t *burst);
diff --git a/include/osmocom/coding/gsm0503_mapping.h b/include/osmocom/coding/gsm0503_mapping.h
index 4c6550a..7dac766 100644
--- a/include/osmocom/coding/gsm0503_mapping.h
+++ b/include/osmocom/coding/gsm0503_mapping.h
@@ -7,8 +7,8 @@
 void gsm0503_xcch_burst_map(ubit_t *iB, ubit_t *eB, const ubit_t *hl,
 	const ubit_t *hn);
 
-void gsm0503_tch_burst_unmap(sbit_t *iB, sbit_t *eB, sbit_t *h, int odd);
-void gsm0503_tch_burst_map(ubit_t *iB, ubit_t *eB, const ubit_t *h, int odd);
+void gsm0503_tch_burst_unmap(sbit_t *iB, const sbit_t *eB, sbit_t *h, int odd);
+void gsm0503_tch_burst_map(const ubit_t *iB, ubit_t *eB, const ubit_t *h, int odd);
 
 void gsm0503_mcs5_ul_burst_map(const ubit_t *di, ubit_t *eB,
 	const ubit_t *hi, int B);
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index baf1ce1..d752454 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -490,7 +490,7 @@
 	return res;
 }
 
-static int _xcch_decode_cB(uint8_t *l2_data, sbit_t *cB,
+static int _xcch_decode_cB(uint8_t *l2_data, const sbit_t *cB,
 	int *n_errors, int *n_bits_total)
 {
 	ubit_t conv[224];
@@ -509,7 +509,7 @@
 	return 0;
 }
 
-static int _xcch_encode_cB(ubit_t *cB, uint8_t *l2_data)
+static int _xcch_encode_cB(ubit_t *cB, const uint8_t *l2_data)
 {
 	ubit_t conv[224];
 
@@ -525,7 +525,7 @@
 /*
  * GSM xCCH block transcoding
  */
-int gsm0503_xcch_decode(uint8_t *l2_data, sbit_t *bursts,
+int gsm0503_xcch_decode(uint8_t *l2_data, const sbit_t *bursts,
 	int *n_errors, int *n_bits_total)
 {
 	sbit_t iB[456], cB[456];
@@ -539,7 +539,7 @@
 	return _xcch_decode_cB(l2_data, cB, n_errors, n_bits_total);
 }
 
-int gsm0503_xcch_encode(ubit_t *bursts, uint8_t *l2_data)
+int gsm0503_xcch_encode(ubit_t *bursts, const uint8_t *l2_data)
 {
 	ubit_t iB[456], cB[456], hl = 1, hn = 1;
 	int i;
@@ -748,7 +748,7 @@
  * 3. CRC check
  * 4. Block combining (MCS-7,8,9 only)
  */
-static int egprs_decode_data(uint8_t *l2_data, sbit_t *c,
+static int egprs_decode_data(uint8_t *l2_data, const sbit_t *c,
 	int mcs, int p, int blk, int *n_errors, int *n_bits_total)
 {
 	ubit_t u[EGPRS_DATA_U_MAX];
@@ -809,7 +809,7 @@
  * 3. Burst unmapping and deinterleaving
  * 4. Data section decoding
  */
-int gsm0503_pdtch_egprs_decode(uint8_t *l2_data, sbit_t *bursts, uint16_t nbits,
+int gsm0503_pdtch_egprs_decode(uint8_t *l2_data, const sbit_t *bursts, uint16_t nbits,
 	uint8_t *usf_p, int *n_errors, int *n_bits_total)
 {
 	sbit_t dc[EGPRS_DATA_DC_MAX];
@@ -879,7 +879,7 @@
  * GSM PDTCH block transcoding
  */
 
-int gsm0503_pdtch_decode(uint8_t *l2_data, sbit_t *bursts, uint8_t *usf_p,
+int gsm0503_pdtch_decode(uint8_t *l2_data, const sbit_t *bursts, uint8_t *usf_p,
 	int *n_errors, int *n_bits_total)
 {
 	sbit_t iB[456], cB[676], hl_hn[8];
@@ -1031,7 +1031,7 @@
 /*
  * EGPRS PDTCH UL block encoding
  */
-static int egprs_type3_map(ubit_t *bursts, ubit_t *hc, ubit_t *dc, int usf)
+static int egprs_type3_map(ubit_t *bursts, const ubit_t *hc, const ubit_t *dc, int usf)
 {
 	int i;
 	ubit_t iB[456];
@@ -1047,7 +1047,7 @@
 	return 0;
 }
 
-static int egprs_type2_map(ubit_t *bursts, ubit_t *hc, ubit_t *dc, int usf)
+static int egprs_type2_map(ubit_t *bursts, const ubit_t *hc, const ubit_t *dc, int usf)
 {
 	int i;
 	const ubit_t *up;
@@ -1065,8 +1065,8 @@
 	return 0;
 }
 
-static int egprs_type1_map(ubit_t *bursts, ubit_t *hc,
-	ubit_t *c1, ubit_t *c2, int usf, int mcs)
+static int egprs_type1_map(ubit_t *bursts, const ubit_t *hc,
+	const ubit_t *c1, const ubit_t *c2, int usf, int mcs)
 {
 	int i;
 	const ubit_t *up;
@@ -1088,7 +1088,7 @@
 	return 0;
 }
 
-static int egprs_encode_hdr(ubit_t *hc, uint8_t *l2_data, int mcs)
+static int egprs_encode_hdr(ubit_t *hc, const uint8_t *l2_data, int mcs)
 {
 	int i, j;
 	ubit_t upp[EGPRS_HDR_UPP_MAX], C[EGPRS_HDR_C_MAX];
@@ -1122,7 +1122,7 @@
 	return 0;
 }
 
-static int egprs_encode_data(ubit_t *c, uint8_t *l2_data,
+static int egprs_encode_data(ubit_t *c, const uint8_t *l2_data,
 	int mcs, int p, int blk)
 {
 	int i, j, data_len;
@@ -1168,7 +1168,7 @@
  * Type 3 - MCS-1,2,3,4
  */
 static int egprs_parse_dl_cps(struct egprs_cps *cps,
-	union gprs_rlc_dl_hdr_egprs *hdr, int type)
+	const union gprs_rlc_dl_hdr_egprs *hdr, int type)
 {
 	uint8_t bits;
 
@@ -1193,7 +1193,7 @@
  * EGPRS DL message encoding
  */
 int gsm0503_pdtch_egprs_encode(ubit_t *bursts,
-	uint8_t *l2_data, uint8_t l2_len)
+	const uint8_t *l2_data, uint8_t l2_len)
 {
 	ubit_t hc[EGPRS_DATA_C_MAX], dc[EGPRS_DATA_DC_MAX];
 	ubit_t c1[EGPRS_DATA_C1], c2[EGPRS_DATA_C2];
@@ -1282,7 +1282,7 @@
 	return -1;
 }
 
-int gsm0503_pdtch_encode(ubit_t *bursts, uint8_t *l2_data, uint8_t l2_len)
+int gsm0503_pdtch_encode(ubit_t *bursts, const uint8_t *l2_data, uint8_t l2_len)
 {
 	ubit_t iB[456], cB[676];
 	const ubit_t *hl_hn;
@@ -1367,7 +1367,7 @@
  */
 
 static void tch_fr_reassemble(uint8_t *tch_data,
-	ubit_t *b_bits, int net_order)
+	const ubit_t *b_bits, int net_order)
 {
 	int i, j, k, l, o;
 
@@ -1399,7 +1399,7 @@
 }
 
 static void tch_fr_disassemble(ubit_t *b_bits,
-	uint8_t *tch_data, int net_order)
+	const uint8_t *tch_data, int net_order)
 {
 	int i, j, k, l, o;
 
@@ -1426,7 +1426,7 @@
 	}
 }
 
-static void tch_hr_reassemble(uint8_t *tch_data, ubit_t *b_bits)
+static void tch_hr_reassemble(uint8_t *tch_data, const ubit_t *b_bits)
 {
 	int i, j;
 
@@ -1437,7 +1437,7 @@
 		tch_data[j >> 3] |= (b_bits[i] << (7 - (j & 7)));
 }
 
-static void tch_hr_disassemble(ubit_t *b_bits, uint8_t *tch_data)
+static void tch_hr_disassemble(ubit_t *b_bits, const uint8_t *tch_data)
 {
 	int i, j;
 
@@ -1445,7 +1445,7 @@
 		b_bits[i] = (tch_data[j >> 3] >> (7 - (j & 7))) & 1;
 }
 
-static void tch_efr_reassemble(uint8_t *tch_data, ubit_t *b_bits)
+static void tch_efr_reassemble(uint8_t *tch_data, const ubit_t *b_bits)
 {
 	int i, j;
 
@@ -1456,7 +1456,7 @@
 		tch_data[j >> 3] |= (b_bits[i] << (7 - (j & 7)));
 }
 
-static void tch_efr_disassemble(ubit_t *b_bits, uint8_t *tch_data)
+static void tch_efr_disassemble(ubit_t *b_bits, const uint8_t *tch_data)
 {
 	int i, j;
 
@@ -1464,7 +1464,7 @@
 		b_bits[i] = (tch_data[j >> 3] >> (7 - (j & 7))) & 1;
 }
 
-static void tch_amr_reassemble(uint8_t *tch_data, ubit_t *d_bits, int len)
+static void tch_amr_reassemble(uint8_t *tch_data, const ubit_t *d_bits, int len)
 {
 	int i, j;
 
@@ -1474,7 +1474,7 @@
 		tch_data[j >> 3] |= (d_bits[i] << (7 - (j & 7)));
 }
 
-static void tch_amr_disassemble(ubit_t *d_bits, uint8_t *tch_data, int len)
+static void tch_amr_disassemble(ubit_t *d_bits, const uint8_t *tch_data, int len)
 {
 	int i, j;
 
@@ -1482,7 +1482,7 @@
 		d_bits[i] = (tch_data[j >> 3] >> (7 - (j & 7))) & 1;
 }
 
-static void tch_fr_d_to_b(ubit_t *b_bits, ubit_t *d_bits)
+static void tch_fr_d_to_b(ubit_t *b_bits, const ubit_t *d_bits)
 {
 	int i;
 
@@ -1490,7 +1490,7 @@
 		b_bits[gsm610_bitorder[i]] = d_bits[i];
 }
 
-static void tch_fr_b_to_d(ubit_t *d_bits, ubit_t *b_bits)
+static void tch_fr_b_to_d(ubit_t *d_bits, const ubit_t *b_bits)
 {
 	int i;
 
@@ -1498,7 +1498,7 @@
 		d_bits[i] = b_bits[gsm610_bitorder[i]];
 }
 
-static void tch_hr_d_to_b(ubit_t *b_bits, ubit_t *d_bits)
+static void tch_hr_d_to_b(ubit_t *b_bits, const ubit_t *d_bits)
 {
 	int i;
 
@@ -1513,7 +1513,7 @@
 		b_bits[map[i]] = d_bits[i];
 }
 
-static void tch_hr_b_to_d(ubit_t *d_bits, ubit_t *b_bits)
+static void tch_hr_b_to_d(ubit_t *d_bits, const ubit_t *b_bits)
 {
 	int i;
 	const uint16_t *map;
@@ -1527,7 +1527,7 @@
 		d_bits[i] = b_bits[map[i]];
 }
 
-static void tch_efr_d_to_w(ubit_t *b_bits, ubit_t *d_bits)
+static void tch_efr_d_to_w(ubit_t *b_bits, const ubit_t *d_bits)
 {
 	int i;
 
@@ -1535,7 +1535,7 @@
 		b_bits[gsm660_bitorder[i]] = d_bits[i];
 }
 
-static void tch_efr_w_to_d(ubit_t *d_bits, ubit_t *b_bits)
+static void tch_efr_w_to_d(ubit_t *d_bits, const ubit_t *b_bits)
 {
 	int i;
 
@@ -1543,7 +1543,7 @@
 		d_bits[i] = b_bits[gsm660_bitorder[i]];
 }
 
-static void tch_efr_protected(ubit_t *s_bits, ubit_t *b_bits)
+static void tch_efr_protected(const ubit_t *s_bits, ubit_t *b_bits)
 {
 	int i;
 
@@ -1551,7 +1551,7 @@
 		b_bits[i] = s_bits[gsm0503_gsm_efr_protected_bits[i] - 1];
 }
 
-static void tch_fr_unreorder(ubit_t *d, ubit_t *p, ubit_t *u)
+static void tch_fr_unreorder(ubit_t *d, ubit_t *p, const ubit_t *u)
 {
 	int i;
 
@@ -1564,7 +1564,7 @@
 		p[i] = u[91 + i];
 }
 
-static void tch_fr_reorder(ubit_t *u, ubit_t *d, ubit_t *p)
+static void tch_fr_reorder(ubit_t *u, const ubit_t *d, const ubit_t *p)
 {
 	int i;
 
@@ -1577,19 +1577,19 @@
 		u[91 + i] = p[i];
 }
 
-static void tch_hr_unreorder(ubit_t *d, ubit_t *p, ubit_t *u)
+static void tch_hr_unreorder(ubit_t *d, ubit_t *p, const ubit_t *u)
 {
 	memcpy(d, u, 95);
 	memcpy(p, u + 95, 3);
 }
 
-static void tch_hr_reorder(ubit_t *u, ubit_t *d, ubit_t *p)
+static void tch_hr_reorder(ubit_t *u, const ubit_t *d, const ubit_t *p)
 {
 	memcpy(u, d, 95);
 	memcpy(u + 95, p, 3);
 }
 
-static void tch_efr_reorder(ubit_t *w, ubit_t *s, ubit_t *p)
+static void tch_efr_reorder(ubit_t *w, const ubit_t *s, const ubit_t *p)
 {
 	memcpy(w, s, 71);
 	w[71] = w[72] = s[69];
@@ -1603,7 +1603,7 @@
 	memcpy(w + 252, p, 8);
 }
 
-static void tch_efr_unreorder(ubit_t *s, ubit_t *p, ubit_t *w)
+static void tch_efr_unreorder(ubit_t *s, ubit_t *p, const ubit_t *w)
 {
 	int sum;
 
@@ -1623,22 +1623,21 @@
 	memcpy(p, w + 252, 8);
 }
 
-static void tch_amr_merge(ubit_t *u, ubit_t *d, ubit_t *p, int len, int prot)
+static void tch_amr_merge(ubit_t *u, const ubit_t *d, const ubit_t *p, int len, int prot)
 {
 	memcpy(u, d, prot);
 	memcpy(u + prot, p, 6);
 	memcpy(u + prot + 6, d + prot, len - prot);
 }
 
-static void tch_amr_unmerge(ubit_t *d, ubit_t *p,
-	ubit_t *u, int len, int prot)
+static void tch_amr_unmerge(ubit_t *d, ubit_t *p, const ubit_t *u, int len, int prot)
 {
 	memcpy(d, u, prot);
 	memcpy(p, u + prot, 6);
 	memcpy(d + prot, u + prot + 6, len - prot);
 }
 
-int gsm0503_tch_fr_decode(uint8_t *tch_data, sbit_t *bursts,
+int gsm0503_tch_fr_decode(uint8_t *tch_data, const sbit_t *bursts,
 	int net_order, int efr, int *n_errors, int *n_bits_total)
 {
 	sbit_t iB[912], cB[456], h;
@@ -1703,7 +1702,7 @@
 	return len;
 }
 
-int gsm0503_tch_fr_encode(ubit_t *bursts, uint8_t *tch_data,
+int gsm0503_tch_fr_encode(ubit_t *bursts, const uint8_t *tch_data,
 	int len, int net_order)
 {
 	ubit_t iB[912], cB[456], h;
@@ -1761,7 +1760,7 @@
 	return 0;
 }
 
-int gsm0503_tch_hr_decode(uint8_t *tch_data, sbit_t *bursts, int odd,
+int gsm0503_tch_hr_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
 	int *n_errors, int *n_bits_total)
 {
 	sbit_t iB[912], cB[456], h;
@@ -1831,7 +1830,7 @@
 	return 15;
 }
 
-int gsm0503_tch_hr_encode(ubit_t *bursts, uint8_t *tch_data, int len)
+int gsm0503_tch_hr_encode(ubit_t *bursts, const uint8_t *tch_data, int len)
 {
 	ubit_t iB[912], cB[456], h;
 	ubit_t conv[98], b[112], d[112], p[3];
@@ -1886,7 +1885,7 @@
 	return 0;
 }
 
-int gsm0503_tch_afs_decode(uint8_t *tch_data, sbit_t *bursts,
+int gsm0503_tch_afs_decode(uint8_t *tch_data, const sbit_t *bursts,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft,
 	uint8_t *cmr, int *n_errors, int *n_bits_total)
 {
@@ -2081,7 +2080,7 @@
 	return len;
 }
 
-int gsm0503_tch_afs_encode(ubit_t *bursts, uint8_t *tch_data, int len,
+int gsm0503_tch_afs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft,
 	uint8_t cmr)
 {
@@ -2241,7 +2240,7 @@
 	return -1;
 }
 
-int gsm0503_tch_ahs_decode(uint8_t *tch_data, sbit_t *bursts, int odd,
+int gsm0503_tch_ahs_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t *ft,
 	uint8_t *cmr, int *n_errors, int *n_bits_total)
 {
@@ -2444,7 +2443,7 @@
 	return len;
 }
 
-int gsm0503_tch_ahs_encode(ubit_t *bursts, uint8_t *tch_data, int len,
+int gsm0503_tch_ahs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
 	int codec_mode_req, uint8_t *codec, int codecs, uint8_t ft,
 	uint8_t cmr)
 {
@@ -2618,7 +2617,7 @@
 	return 0;
 }
 
-int gsm0503_rach_decode(uint8_t *ra, sbit_t *burst, uint8_t bsic)
+int gsm0503_rach_decode(uint8_t *ra, const sbit_t *burst, uint8_t bsic)
 {
 	ubit_t conv[14];
 	int rv;
@@ -2636,7 +2635,7 @@
 	return 0;
 }
 
-int gsm0503_rach_encode(ubit_t *burst, uint8_t *ra, uint8_t bsic)
+int gsm0503_rach_encode(ubit_t *burst, const uint8_t *ra, uint8_t bsic)
 {
 	ubit_t conv[14];
 
@@ -2654,7 +2653,7 @@
 /*
  * GSM SCH transcoding
  */
-int gsm0503_sch_decode(uint8_t *sb_info, sbit_t *burst)
+int gsm0503_sch_decode(uint8_t *sb_info, const sbit_t *burst)
 {
 	ubit_t conv[35];
 	int rv;
@@ -2670,7 +2669,7 @@
 	return 0;
 }
 
-int gsm0503_sch_encode(ubit_t *burst, uint8_t *sb_info)
+int gsm0503_sch_encode(ubit_t *burst, const uint8_t *sb_info)
 {
 	ubit_t conv[35];
 
diff --git a/src/coding/gsm0503_mapping.c b/src/coding/gsm0503_mapping.c
index 366eeb4..87bbb33 100644
--- a/src/coding/gsm0503_mapping.c
+++ b/src/coding/gsm0503_mapping.c
@@ -50,7 +50,7 @@
 		eB[58] = *hn;
 }
 
-void gsm0503_tch_burst_unmap(sbit_t *iB, sbit_t *eB, sbit_t *h, int odd)
+void gsm0503_tch_burst_unmap(sbit_t *iB, const sbit_t *eB, sbit_t *h, int odd)
 {
 	int i;
 
@@ -70,7 +70,7 @@
 	}
 }
 
-void gsm0503_tch_burst_map(ubit_t *iB, ubit_t *eB, const ubit_t *h, int odd)
+void gsm0503_tch_burst_map(const ubit_t *iB, ubit_t *eB, const ubit_t *h, int odd)
 {
 	int i;
 

-- 
To view, visit https://gerrit.osmocom.org/2882
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8731d7ae6171dff94741b6ddbb95ab5f03bfd4e
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list