diff options
author | Darren Tucker <dtucker@dtucker.net> | 2020-06-19 19:10:47 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-06-19 19:10:47 +1000 |
commit | 1babb8bb14c423011ca34c2f563bb1c51c8fbf1d (patch) | |
tree | 18b4e48538e8114e00a52925ac8d3d280766acf3 /openbsd-compat | |
parent | 9e065729592633290e5ddb6852792913b2286545 (diff) |
Extra brackets around sizeof() in bcrypt.
Prevents following warning from clang 10:
bcrypt_pbkdf.c:94:40: error: expression does not compute the number of
elements in this array; element type is ´uint32_tÂ[...]
place parentheses around the ´sizeof(uint64_t)´ expression to
silence this warning
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/bcrypt_pbkdf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/bcrypt_pbkdf.c b/openbsd-compat/bcrypt_pbkdf.c index 785234563..36d5d085c 100644 --- a/openbsd-compat/bcrypt_pbkdf.c +++ b/openbsd-compat/bcrypt_pbkdf.c | |||
@@ -91,7 +91,7 @@ bcrypt_hash(u_int8_t *sha2pass, u_int8_t *sha2salt, u_int8_t *out) | |||
91 | cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext), | 91 | cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext), |
92 | &j); | 92 | &j); |
93 | for (i = 0; i < 64; i++) | 93 | for (i = 0; i < 64; i++) |
94 | blf_enc(&state, cdata, sizeof(cdata) / sizeof(uint64_t)); | 94 | blf_enc(&state, cdata, sizeof(cdata) / (sizeof(uint64_t))); |
95 | 95 | ||
96 | /* copy out */ | 96 | /* copy out */ |
97 | for (i = 0; i < BCRYPT_WORDS; i++) { | 97 | for (i = 0; i < BCRYPT_WORDS; i++) { |