aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-02-06 17:45:33 +0100
committerHarald Welte <laforge@osmocom.org>2021-02-06 17:45:33 +0100
commitc584d87d0c0723dc30571b5df4b193139a51f5d0 (patch)
tree482a65c9de77cc3c4934c201e0a296321e04a22a
parent20642478f3488f12d650f7d0f1b26f58388f15d8 (diff)
xua_msg_add_data() Mark input argument as 'const'
We only read from it. Change-Id: I12c17273b9d64a084f59d91fc06ae1512d70855b
-rw-r--r--include/osmocom/sigtran/xua_msg.h2
-rw-r--r--src/xua_msg.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h
index e912e02..090d84e 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -74,7 +74,7 @@ void osmo_xua_msg_tall_ctx_init(void *ctx);
struct xua_msg *xua_msg_alloc(void);
void xua_msg_free(struct xua_msg *msg);
-int xua_msg_add_data(struct xua_msg *msg, uint16_t tag, uint16_t len, uint8_t *dat);
+int xua_msg_add_data(struct xua_msg *msg, uint16_t tag, uint16_t len, const uint8_t *dat);
struct xua_msg_part *xua_msg_find_tag(const struct xua_msg *msg, uint16_t tag);
int xua_msg_free_tag(struct xua_msg *xua, uint16_t tag);
diff --git a/src/xua_msg.c b/src/xua_msg.c
index 894bef9..10bedb4 100644
--- a/src/xua_msg.c
+++ b/src/xua_msg.c
@@ -59,7 +59,7 @@ void xua_msg_free(struct xua_msg *msg)
}
int xua_msg_add_data(struct xua_msg *msg, uint16_t tag,
- uint16_t len, uint8_t *dat)
+ uint16_t len, const uint8_t *dat)
{
struct xua_msg_part *part;