aboutsummaryrefslogtreecommitdiffstats
path: root/gtp
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-13 05:04:33 +0200
committerHarald Welte <laforge@gnumonks.org>2017-10-13 16:36:43 +0200
commit02af9b3ca274d72f972b81a9103f7b63d6caece8 (patch)
tree7f62eba039d334905f15941229b4dc4ccfc98451 /gtp
parentdb924d39082b0cb6e1371c949149737fe1d4a05c (diff)
gtpie_tlv() gtpie_tv0(): const-ify read-only input argument
Diffstat (limited to 'gtp')
-rw-r--r--gtp/gtpie.c4
-rw-r--r--gtp/gtpie.h4
2 files changed, 4 insertions, 4 deletions
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_tlv(void *p, unsigned int *length, unsigned int size, uint8_t t,
}
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 @@ struct tlv2 {
} __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,