1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 03:50:58 +00:00

util: readprotobufint uses const argument

This commit is contained in:
Pavol Rusnak 2019-02-10 13:17:25 +01:00
parent 0ab3eee37d
commit 7288d056a1
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 2 additions and 2 deletions

2
util.c
View File

@ -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) {

2
util.h
View File

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