diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-08 21:25:50 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-10-18 19:08:32 +0200 |
commit | 815b289cb3438ed566b3e9dc5074fe12e4b98f46 (patch) | |
tree | f4a92ac428098eda3a82da4549652b2ea079a599 /utils/imxtools/sbtools/misc.c | |
parent | 387a45923c2ea6b223584815c7cd796ae064e22e (diff) | |
download | rockbox-815b289cb3438ed566b3e9dc5074fe12e4b98f46.tar.gz rockbox-815b289cb3438ed566b3e9dc5074fe12e4b98f46.zip |
imxtools: Replace use of "byte" with its underlying uint8_t.
libtomcrypt uses a macro "byte" which conflicts with this type. Since
the underlying type is uint8_t and there's no real benefit from using a
custom type use the actual underlying type.
Change-Id: I982c9b8bdcb657b99fa645a5235303af7afda25b
Diffstat (limited to 'utils/imxtools/sbtools/misc.c')
-rw-r--r-- | utils/imxtools/sbtools/misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/imxtools/sbtools/misc.c b/utils/imxtools/sbtools/misc.c index 6216ae612b..c5832b6bb9 100644 --- a/utils/imxtools/sbtools/misc.c +++ b/utils/imxtools/sbtools/misc.c | |||
@@ -58,7 +58,7 @@ void *xmalloc(size_t s) | |||
58 | return r; | 58 | return r; |
59 | } | 59 | } |
60 | 60 | ||
61 | int convxdigit(char digit, byte *val) | 61 | int convxdigit(char digit, uint8_t *val) |
62 | { | 62 | { |
63 | if(digit >= '0' && digit <= '9') | 63 | if(digit >= '0' && digit <= '9') |
64 | { | 64 | { |
@@ -127,7 +127,7 @@ bool parse_key(char **pstr, struct crypto_key_t *key) | |||
127 | { | 127 | { |
128 | for(int j = 0; j < 128; j++) | 128 | for(int j = 0; j < 128; j++) |
129 | { | 129 | { |
130 | byte a, b; | 130 | uint8_t a, b; |
131 | if(convxdigit(str[2 * j], &a) || convxdigit(str[2 * j + 1], &b)) | 131 | if(convxdigit(str[2 * j], &a) || convxdigit(str[2 * j + 1], &b)) |
132 | return false; | 132 | return false; |
133 | key->u.xor_key[j / 64].key[j % 64] = (a << 4) | b; | 133 | key->u.xor_key[j / 64].key[j % 64] = (a << 4) | b; |
@@ -143,7 +143,7 @@ bool parse_key(char **pstr, struct crypto_key_t *key) | |||
143 | return false; | 143 | return false; |
144 | for(int j = 0; j < 16; j++) | 144 | for(int j = 0; j < 16; j++) |
145 | { | 145 | { |
146 | byte a, b; | 146 | uint8_t a, b; |
147 | if(convxdigit(str[2 * j], &a) || convxdigit(str[2 * j + 1], &b)) | 147 | if(convxdigit(str[2 * j], &a) || convxdigit(str[2 * j + 1], &b)) |
148 | return false; | 148 | return false; |
149 | key->u.key[j] = (a << 4) | b; | 149 | key->u.key[j] = (a << 4) | b; |
@@ -243,7 +243,7 @@ bool add_keys_from_file(const char *key_file) | |||
243 | return true; | 243 | return true; |
244 | } | 244 | } |
245 | 245 | ||
246 | void print_hex(void *user, misc_printf_t printf, byte *data, int len, bool newline) | 246 | void print_hex(void *user, misc_printf_t printf, uint8_t *data, int len, bool newline) |
247 | { | 247 | { |
248 | for(int i = 0; i < len; i++) | 248 | for(int i = 0; i < len; i++) |
249 | printf(user, "%02X ", data[i]); | 249 | printf(user, "%02X ", data[i]); |