Rename union fh members to match lowercase hash names

parent 3f236b4b
......@@ -72,8 +72,8 @@ fh_assert_lengths(void)
assert(fh_len[FH_SHA256] == sizeof fhh.sha256);
#ifdef HAVE_XXHASH_H
assert(fh_len[FH_XXH32] == sizeof fhh.xxh32);
assert(fh_len[FH_XXH3_64] == sizeof fhh.xxh64);
assert(fh_len[FH_XXH3_128] == sizeof fhh.xxh128);
assert(fh_len[FH_XXH3_64] == sizeof fhh.xxh3_64);
assert(fh_len[FH_XXH3_128] == sizeof fhh.xxh3_128);
#endif
}
......@@ -98,10 +98,10 @@ fh(uint8_t fht, union fh *fhh, const void *p, size_t l)
FH_H_XXH32(fhh->xxh32, p, l);
break;
case FH_XXH3_64:
FH_H_XXH3_64(fhh->xxh64, p, l);
FH_H_XXH3_64(fhh->xxh3_64, p, l);
break;
case FH_XXH3_128:
FH_H_XXH3_128(fhh->xxh128, p, l);
FH_H_XXH3_128(fhh->xxh3_128, p, l);
break;
#else
case FH_XXH32:
......@@ -137,9 +137,9 @@ fhcmp(uint8_t fht, const union fh *fhh, const void *p, size_t l)
case FH_XXH32:
return (FH_C_XXH32(fhh->xxh32, p, l));
case FH_XXH3_64:
return (FH_C_XXH3_64(fhh->xxh64, p, l));
return (FH_C_XXH3_64(fhh->xxh3_64, p, l));
case FH_XXH3_128:
return (FH_C_XXH3_128(fhh->xxh128, p, l));
return (FH_C_XXH3_128(fhh->xxh3_128, p, l));
#else
case FH_XXH32:
case FH_XXH3_64:
......
......@@ -44,10 +44,10 @@ extern const char * const fh_name[FH_LIM];
*/
union fh {
uint8_t sha256[32];
uint8_t sha256[32];
uint32_t xxh32;
uint64_t xxh64;
uint8_t xxh128[16];
uint64_t xxh3_64;
uint8_t xxh3_128[16];
};
void fh(uint8_t fht, union fh *fh, const void *p, size_t l);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment