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:
parent
0ab3eee37d
commit
7288d056a1
2
util.c
2
util.c
@ -44,7 +44,7 @@ void data2hex(const void *data, uint32_t len, char *str)
|
|||||||
str[len * 2] = 0;
|
str[len * 2] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t readprotobufint(uint8_t **ptr)
|
uint32_t readprotobufint(const uint8_t **ptr)
|
||||||
{
|
{
|
||||||
uint32_t result = (**ptr & 0x7F);
|
uint32_t result = (**ptr & 0x7F);
|
||||||
if (**ptr & 0x80) {
|
if (**ptr & 0x80) {
|
||||||
|
2
util.h
2
util.h
@ -42,7 +42,7 @@ void uint32hex(uint32_t num, char *str);
|
|||||||
void data2hex(const void *data, uint32_t len, char *str);
|
void data2hex(const void *data, uint32_t len, char *str);
|
||||||
|
|
||||||
// read protobuf integer and advance pointer
|
// 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);
|
extern void __attribute__((noreturn)) shutdown(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user