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

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


Review at  https://gerrit.osmocom.org/4251

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/51/4251/1

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: newchange
Gerrit-Change-Id: Ide487e34884c8356694246f43c3f1f562357304c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>


More information about the gerrit-log mailing list