[MERGED] osmo-ggsn[master]: gtpie_tlv() gtpie_tv0(): const-ify read-only input argument

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Oct 13 14:41:54 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: gtpie_tlv() gtpie_tv0(): const-ify read-only input argument
......................................................................


gtpie_tlv() gtpie_tv0(): const-ify read-only input argument

Change-Id: Ide487e34884c8356694246f43c3f1f562357304c
---
M gtp/gtpie.c
M gtp/gtpie.h
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/gtp/gtpie.c b/gtp/gtpie.c
index 0744370..accc542 100644
--- a/gtp/gtpie.c
+++ b/gtp/gtpie.c
@@ -40,7 +40,7 @@
 #include "gtpie.h"
 
 int gtpie_tlv(void *p, unsigned int *length, unsigned int size, uint8_t t,
-	      int l, void *v)
+	      int l, const void *v)
 {
 	if ((*length + 3 + l) >= size)
 		return 1;
@@ -52,7 +52,7 @@
 }
 
 int gtpie_tv0(void *p, unsigned int *length, unsigned int size, uint8_t t,
-	      int l, uint8_t * v)
+	      int l, const uint8_t * v)
 {
 	if ((*length + 1 + l) >= size)
 		return 1;
diff --git a/gtp/gtpie.h b/gtp/gtpie.h
index 9fe7943..96ff67a 100644
--- a/gtp/gtpie.h
+++ b/gtp/gtpie.h
@@ -221,9 +221,9 @@
 } __attribute__ ((packed));
 
 extern int gtpie_tlv(void *p, unsigned int *length, unsigned int size,
-		     uint8_t t, int l, void *v);
+		     uint8_t t, int l, const void *v);
 extern int gtpie_tv0(void *p, unsigned int *length, unsigned int size,
-		     uint8_t t, int l, uint8_t * v);
+		     uint8_t t, int l, const uint8_t * v);
 extern int gtpie_tv1(void *p, unsigned int *length, unsigned int size,
 		     uint8_t t, uint8_t v);
 extern int gtpie_tv2(void *p, unsigned int *length, unsigned int size,

-- 
To view, visit https://gerrit.osmocom.org/4251
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide487e34884c8356694246f43c3f1f562357304c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list