summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 7414691c2c7..543f8601ebe 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -49,6 +49,7 @@
#include "lkowner.h"
#include "syscall.h"
#include "cli1-xdr.h"
+#define XXH_INLINE_ALL
#include "xxhash.h"
#include <ifaddrs.h>
#include "libglusterfs-messages.h"
@@ -78,17 +79,17 @@ typedef int32_t (*rw_op_t)(int32_t fd, char *buf, int32_t size);
typedef int32_t (*rwv_op_t)(int32_t fd, const struct iovec *buf, int32_t size);
void
-gf_xxh64_wrapper(const unsigned char *data, size_t len, unsigned long long seed,
+gf_xxh64_wrapper(const unsigned char *data, size_t const len, unsigned long long const seed,
char *xxh64)
{
unsigned short i = 0;
- unsigned short lim = GF_XXH64_DIGEST_LENGTH*2+1;
- GF_XXH64_hash_t hash = 0;
- GF_XXH64_canonical_t c_hash = {{0,},};
- const uint8_t *p = (const uint8_t *) &c_hash;
+ const unsigned short lim = GF_XXH64_DIGEST_LENGTH*2+1;
+ XXH64_hash_t hash = 0;
+ XXH64_canonical_t c_hash = {{0,},};
+ const uint8_t *p = (const uint8_t *) &c_hash;
- hash = GF_XXH64(data, len, seed);
- GF_XXH64_canonicalFromHash(&c_hash, hash);
+ hash = XXH64(data, len, seed);
+ XXH64_canonicalFromHash(&c_hash, hash);
for (i = 0; i < GF_XXH64_DIGEST_LENGTH; i++)
snprintf(xxh64 + i * 2, lim-i*2, "%02x", p[i]);