diff --git a/util.c b/util.c index 768410c318..575127421c 100644 --- a/util.c +++ b/util.c @@ -44,7 +44,7 @@ void data2hex(const void *data, uint32_t len, char *str) str[len * 2] = 0; } -uint32_t readprotobufint(uint8_t **ptr) +uint32_t readprotobufint(const uint8_t **ptr) { uint32_t result = (**ptr & 0x7F); if (**ptr & 0x80) { diff --git a/util.h b/util.h index 03faf2dc8d..384ede0e32 100644 --- a/util.h +++ b/util.h @@ -42,7 +42,7 @@ void uint32hex(uint32_t num, char *str); void data2hex(const void *data, uint32_t len, char *str); // read protobuf integer and advance pointer -uint32_t readprotobufint(uint8_t **ptr); +uint32_t readprotobufint(const uint8_t **ptr); extern void __attribute__((noreturn)) shutdown(void);