aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-02-07 12:29:04 +0100
committerHarald Welte <laforge@osmocom.org>2021-02-07 12:43:47 +0100
commit30c2edb0995d9138a5649a5d166746b3c192d322 (patch)
tree6b99a0473bd659d210903039024d1a44c370c0df
parentc584d87d0c0723dc30571b5df4b193139a51f5d0 (diff)
xua_msg: const-ify input arguments to xua_*_get_u32()
-rw-r--r--include/osmocom/sigtran/xua_msg.h4
-rw-r--r--src/xua_msg.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/osmocom/sigtran/xua_msg.h b/include/osmocom/sigtran/xua_msg.h
index 090d84e..a2cdbf2 100644
--- a/include/osmocom/sigtran/xua_msg.h
+++ b/include/osmocom/sigtran/xua_msg.h
@@ -89,8 +89,8 @@ struct xua_msg *xua_from_nested(struct xua_msg_part *outer);
int msgb_t16l16vp_put(struct msgb *msg, uint16_t tag, uint16_t len, const uint8_t *data);
int msgb_t16l16vp_put_u32(struct msgb *msg, uint16_t tag, uint32_t val);
int xua_msg_add_u32(struct xua_msg *xua, uint16_t iei, uint32_t val);
-uint32_t xua_msg_part_get_u32(struct xua_msg_part *part);
-uint32_t xua_msg_get_u32(struct xua_msg *xua, uint16_t iei);
+uint32_t xua_msg_part_get_u32(const struct xua_msg_part *part);
+uint32_t xua_msg_get_u32(const struct xua_msg *xua, uint16_t iei);
void xua_part_add_gt(struct msgb *msg, const struct osmo_sccp_gt *gt);
int xua_msg_add_sccp_addr(struct xua_msg *xua, uint16_t iei, const struct osmo_sccp_addr *addr);
diff --git a/src/xua_msg.c b/src/xua_msg.c
index 10bedb4..79c358c 100644
--- a/src/xua_msg.c
+++ b/src/xua_msg.c
@@ -283,13 +283,13 @@ int xua_msg_add_u32(struct xua_msg *xua, uint16_t iei, uint32_t val)
return xua_msg_add_data(xua, iei, sizeof(val_n), (uint8_t *) &val_n);
}
-uint32_t xua_msg_part_get_u32(struct xua_msg_part *part)
+uint32_t xua_msg_part_get_u32(const struct xua_msg_part *part)
{
OSMO_ASSERT(part->len >= 4);
return ntohl(*(uint32_t *)part->dat);
}
-uint32_t xua_msg_get_u32(struct xua_msg *xua, uint16_t iei)
+uint32_t xua_msg_get_u32(const struct xua_msg *xua, uint16_t iei)
{
struct xua_msg_part *part = xua_msg_find_tag(xua, iei);
if (!part)