Change in osmo-sgsn[master]: llc: gprs_llc_fcs(): make the input data pointer const
fixeria has uploaded this change for review. ( 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(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/80/29280/1 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 fb9db37..0971e12 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, const 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 684252b..a12f36d 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; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/29280 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: If95210fe69f915ab1010fe5916cb6bee3faeb7b9 Gerrit-Change-Number: 29280 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
fixeria