Commit 04819a4ff1c93972ac46aedd3f17becbd5e0b588
Committed by
Tom Rini
1 parent
52aa1cf5ec
Exists in
v2017.01-smarct4x
and in
40 other branches
hash: Use uint8_t in preference to u8
This type is more readily available on the host compiler, so use it instead. Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 2 changed files with 8 additions and 7 deletions Side-by-side Diff
common/hash.c
... | ... | @@ -187,7 +187,7 @@ |
187 | 187 | * @allow_env_vars: non-zero to permit storing the result to an |
188 | 188 | * variable environment |
189 | 189 | */ |
190 | -static void store_result(struct hash_algo *algo, const u8 *sum, | |
190 | +static void store_result(struct hash_algo *algo, const uint8_t *sum, | |
191 | 191 | const char *dest, int allow_env_vars) |
192 | 192 | { |
193 | 193 | unsigned int i; |
... | ... | @@ -243,8 +243,8 @@ |
243 | 243 | * address, and the * prefix is not expected. |
244 | 244 | * @return 0 if ok, non-zero on error |
245 | 245 | */ |
246 | -static int parse_verify_sum(struct hash_algo *algo, char *verify_str, u8 *vsum, | |
247 | - int allow_env_vars) | |
246 | +static int parse_verify_sum(struct hash_algo *algo, char *verify_str, | |
247 | + uint8_t *vsum, int allow_env_vars) | |
248 | 248 | { |
249 | 249 | int env_var = 0; |
250 | 250 | |
... | ... | @@ -311,7 +311,7 @@ |
311 | 311 | return -EPROTONOSUPPORT; |
312 | 312 | } |
313 | 313 | |
314 | -void hash_show(struct hash_algo *algo, ulong addr, ulong len, u8 *output) | |
314 | +void hash_show(struct hash_algo *algo, ulong addr, ulong len, uint8_t *output) | |
315 | 315 | { |
316 | 316 | int i; |
317 | 317 | |
... | ... | @@ -355,8 +355,8 @@ |
355 | 355 | |
356 | 356 | if (multi_hash()) { |
357 | 357 | struct hash_algo *algo; |
358 | - u8 output[HASH_MAX_DIGEST_SIZE]; | |
359 | - u8 vsum[HASH_MAX_DIGEST_SIZE]; | |
358 | + uint8_t output[HASH_MAX_DIGEST_SIZE]; | |
359 | + uint8_t vsum[HASH_MAX_DIGEST_SIZE]; | |
360 | 360 | void *buf; |
361 | 361 | |
362 | 362 | if (hash_lookup_algo(algo_name, &algo)) { |
include/hash.h
... | ... | @@ -139,7 +139,8 @@ |
139 | 139 | * @len: Length of data that was hashed |
140 | 140 | * @output: Hash value to display |
141 | 141 | */ |
142 | -void hash_show(struct hash_algo *algo, ulong addr, ulong len, u8 *output); | |
142 | +void hash_show(struct hash_algo *algo, ulong addr, ulong len, | |
143 | + uint8_t *output); | |
143 | 144 | #endif /* !USE_HOSTCC */ |
144 | 145 | #endif |