fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/29280 )
Change subject: llc: gprs_llc_fcs(): make the input data pointer const ......................................................................
llc: gprs_llc_fcs(): make the input data pointer const
Change-Id: If95210fe69f915ab1010fe5916cb6bee3faeb7b9 --- M include/osmocom/sgsn/crc24.h M include/osmocom/sgsn/gprs_llc.h M src/gprs/crc24.c M src/gprs/gprs_llc_parse.c 4 files changed, 4 insertions(+), 4 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, approved
diff --git a/include/osmocom/sgsn/crc24.h b/include/osmocom/sgsn/crc24.h index 756638c..c913eaf 100644 --- a/include/osmocom/sgsn/crc24.h +++ b/include/osmocom/sgsn/crc24.h @@ -5,6 +5,6 @@
#define INIT_CRC24 0xffffff
-uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len); +uint32_t crc24_calc(uint32_t fcs, const uint8_t *cp, unsigned int len);
#endif diff --git a/include/osmocom/sgsn/gprs_llc.h b/include/osmocom/sgsn/gprs_llc.h index 2c6c98b..6cdb995 100644 --- a/include/osmocom/sgsn/gprs_llc.h +++ b/include/osmocom/sgsn/gprs_llc.h @@ -277,7 +277,7 @@ int gprs_llc_hdr_parse(struct gprs_llc_hdr_parsed *ghp, uint8_t *llc_hdr, int len); void gprs_llc_hdr_dump(struct gprs_llc_hdr_parsed *gph, struct gprs_llc_lle *lle); -int gprs_llc_fcs(uint8_t *data, unsigned int len); +int gprs_llc_fcs(const uint8_t *data, unsigned int len);
/* LLME handling routines */ diff --git a/src/gprs/crc24.c b/src/gprs/crc24.c index da269b3..d47d4ff 100644 --- a/src/gprs/crc24.c +++ b/src/gprs/crc24.c @@ -59,7 +59,7 @@
#define INIT_CRC24 0xffffff
-uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len) +uint32_t crc24_calc(uint32_t fcs, const uint8_t *cp, unsigned int len) { while (len--) fcs = (fcs >> 8) ^ tbl_crc24[(fcs ^ *cp++) & 0xff]; diff --git a/src/gprs/gprs_llc_parse.c b/src/gprs/gprs_llc_parse.c index 1d97004..e400e25 100644 --- a/src/gprs/gprs_llc_parse.c +++ b/src/gprs/gprs_llc_parse.c @@ -55,7 +55,7 @@ #define N202 4 #define CRC24_LENGTH 3
-int gprs_llc_fcs(uint8_t *data, unsigned int len) +int gprs_llc_fcs(const uint8_t *data, unsigned int len) { uint32_t fcs_calc;
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.