Change in libosmo-sccp[master]: xua_msg_add_data() Mark input argument as 'const'

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Feb 7 11:46:19 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/22769 )


Change subject: xua_msg_add_data() Mark input argument as 'const'
......................................................................

xua_msg_add_data() Mark input argument as 'const'

We only read from it.

Change-Id: I12c17273b9d64a084f59d91fc06ae1512d70855b
---
M include/osmocom/sigtran/xua_msg.h
M src/xua_msg.c
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/69/22769/1

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 @@
 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 @@
 }
 
 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;
 

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/22769
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I12c17273b9d64a084f59d91fc06ae1512d70855b
Gerrit-Change-Number: 22769
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210207/6398ecd2/attachment.htm>


More information about the gerrit-log mailing list