Remove redundant BLAKE3_KEY_LEN32

it's the same number as BLAKE3_OUT_LEN32

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40383>
This commit is contained in:
Marek Olšák 2026-03-12 21:34:09 -04:00 committed by Marge Bot
parent 699f9d7066
commit 52d5dfc7d3
2 changed files with 5 additions and 7 deletions

View file

@ -57,7 +57,7 @@ _mesa_sha1_hex_to_sha1(unsigned char *buf, const char *hex)
static void
sha1_to_uint32(const uint8_t sha1[BLAKE3_KEY_LEN],
uint32_t out[BLAKE3_KEY_LEN32])
uint32_t out[BLAKE3_OUT_LEN32])
{
memset(out, 0, BLAKE3_KEY_LEN);
@ -71,16 +71,16 @@ _mesa_sha1_print(FILE *f, const uint8_t sha1[BLAKE3_KEY_LEN])
uint32_t u32[BLAKE3_KEY_LEN];
sha1_to_uint32(sha1, u32);
for (unsigned i = 0; i < BLAKE3_KEY_LEN32; i++) {
for (unsigned i = 0; i < BLAKE3_OUT_LEN32; i++) {
fprintf(f, i ? ", 0x%08" PRIx32 : "0x%08" PRIx32, u32[i]);
}
}
bool
_mesa_printed_sha1_equal(const uint8_t sha1[BLAKE3_KEY_LEN],
const uint32_t printed_sha1[BLAKE3_KEY_LEN32])
const uint32_t printed_sha1[BLAKE3_OUT_LEN32])
{
uint32_t u32[BLAKE3_KEY_LEN32];
uint32_t u32[BLAKE3_OUT_LEN32];
sha1_to_uint32(sha1, u32);
return memcmp(u32, printed_sha1, sizeof(u32)) == 0;

View file

@ -32,8 +32,6 @@
extern "C" {
#endif
#define BLAKE3_KEY_LEN32 (BLAKE3_KEY_LEN / 4)
void
_mesa_sha1_format(char *buf, const unsigned char *sha1);
@ -48,7 +46,7 @@ _mesa_sha1_print(FILE *f, const uint8_t sha1[BLAKE3_KEY_LEN]);
bool
_mesa_printed_sha1_equal(const uint8_t sha1[BLAKE3_KEY_LEN],
const uint32_t printed_sha1[BLAKE3_KEY_LEN32]);
const uint32_t printed_sha1[BLAKE3_OUT_LEN32]);
#ifdef __cplusplus
} /* extern C */