aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-12-21 17:17:58 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2022-12-21 18:37:45 +0100
commit26a02deb1215fb68847b2078d97495a01fe2a857 (patch)
tree410e0ad0915ad4856f31b0cfd0393bcfde83a747
parent17b1142959f6f916e5d3c04c0622a69acfe51667 (diff)
amr: constify input buffer in osmo_amr_is_oa()
-rw-r--r--include/osmocom/netif/amr.h2
-rw-r--r--src/amr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h
index 47f7f3d..e8f08d4 100644
--- a/include/osmocom/netif/amr.h
+++ b/include/osmocom/netif/amr.h
@@ -159,7 +159,7 @@ int osmo_amr_ft_valid(uint8_t amr_ft);
size_t osmo_amr_bytes(uint8_t amr_cmr);
size_t osmo_amr_bits(uint8_t amr_ft);
-bool osmo_amr_is_oa(uint8_t *payload, unsigned int payload_len);
+bool osmo_amr_is_oa(const uint8_t *payload, unsigned int payload_len);
int osmo_amr_oa_to_bwe(uint8_t *payload, unsigned int payload_len);
int osmo_amr_bwe_to_oa(uint8_t *payload, unsigned int payload_len,
unsigned int payload_maxlen);
diff --git a/src/amr.c b/src/amr.c
index 66f41c6..b648d54 100644
--- a/src/amr.c
+++ b/src/amr.c
@@ -113,7 +113,7 @@ int osmo_amr_ft_valid(uint8_t amr_ft)
* \param[inout] payload user provided memory containing the AMR payload.
* \param[in] payload_len overall length of the AMR payload.
* \returns true when the payload is octet aligned. */
-bool osmo_amr_is_oa(uint8_t *payload, unsigned int payload_len)
+bool osmo_amr_is_oa(const uint8_t *payload, unsigned int payload_len)
{
/* NOTE: The distinction between octet-aligned and bandwith-efficient
* mode normally relys on out of band methods that explicitly select