aboutsummaryrefslogtreecommitdiff
path: root/src/hash/xxh.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-08-26 16:13:19 -0500
committerame <[email protected]>2024-08-26 16:13:25 -0500
commitfda120441cabfefc511786d7a6af40eec9f181fa (patch)
tree5d6e80abc948ba0034d3b4f32bba6746d95735e5 /src/hash/xxh.c
parent90c4b7dcbc57d2f86a77c997069d96158d54ca55 (diff)
use integer format macros
Diffstat (limited to 'src/hash/xxh.c')
-rw-r--r--src/hash/xxh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash/xxh.c b/src/hash/xxh.c
index 052db3f..3fd213c 100644
--- a/src/hash/xxh.c
+++ b/src/hash/xxh.c
@@ -1,6 +1,7 @@
#include "../crypto.h"
#include <stdio.h>
#include <stdint.h>
+#include <inttypes.h>
#define max_buffer_size32 16
#define max_buffer_size64 32
@@ -129,7 +130,7 @@ int l_xxh64(lua_State* L){
char digest[64];
uint64_t u = i_xxhash64(a, seed, len);
- sprintf(digest,"%016llx",u);
+ sprintf(digest,"%016"PRIx64,u);
lua_pushstring(L, digest);
return 1;