summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-06-12 09:40:16 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-12 12:59:21 +0200
commitb9946d372cb17c95ef629449961004d6e6f12239 (patch)
treef2d16153c09061d29b8e304ba0ecf33ba8a93f52 /include
parent29567376814597a93d78c337242fd1a6ded179ad (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/coding/gsm0503_coding.h36
-rw-r--r--include/osmocom/coding/gsm0503_mapping.h6
2 files changed, 21 insertions, 21 deletions
diff --git a/include/osmocom/coding/gsm0503_coding.h b/include/osmocom/coding/gsm0503_coding.h
index b8eb2052..f6591f53 100644
--- a/include/osmocom/coding/gsm0503_coding.h
+++ b/include/osmocom/coding/gsm0503_coding.h
@@ -21,43 +21,43 @@ enum gsm0503_egprs_mcs {
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 4c6550a4..93e4b677 100644
--- a/include/osmocom/coding/gsm0503_mapping.h
+++ b/include/osmocom/coding/gsm0503_mapping.h
@@ -4,11 +4,11 @@
void gsm0503_xcch_burst_unmap(sbit_t *iB, const sbit_t *eB,
sbit_t *hl, sbit_t *hn);
-void gsm0503_xcch_burst_map(ubit_t *iB, ubit_t *eB, const ubit_t *hl,
+void gsm0503_xcch_burst_map(const 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);