Commit f6027426102430eb80a6df7ce1bf2e31d15cf85d

Christian Weisgerber 2022-02-12T21:48:46

consistently match size of hash variables to that returned by murmurhash ok millert stsp

diff --git a/lib/deltify.c b/lib/deltify.c
index f2d7dcd..3580b0e 100644
--- a/lib/deltify.c
+++ b/lib/deltify.c
@@ -95,7 +95,7 @@ hashblk(const unsigned char *p, off_t n)
 
 static const struct got_error *
 addblk(struct got_delta_table *dt, FILE *f, off_t file_offset0, off_t len,
-    off_t offset, uint64_t h)
+    off_t offset, uint32_t h)
 {
 	const struct got_error *err = NULL;
 	int i;
@@ -173,7 +173,7 @@ addblk(struct got_delta_table *dt, FILE *f, off_t file_offset0, off_t len,
 
 static const struct got_error *
 addblk_mem(struct got_delta_table *dt, uint8_t *data, off_t file_offset0,
-    off_t len, off_t offset, uint64_t h)
+    off_t len, off_t offset, uint32_t h)
 {
 	const struct got_error *err = NULL;
 	int i;
@@ -403,7 +403,7 @@ got_deltify_init_mem(struct got_delta_table **dt, uint8_t *data,
     off_t fileoffset, off_t filesize)
 {
 	const struct got_error *err = NULL;
-	uint64_t h;
+	uint32_t h;
 	const off_t offset0 = fileoffset;
 
 	*dt = calloc(1, sizeof(**dt));
diff --git a/lib/got_lib_deltify.h b/lib/got_lib_deltify.h
index c458845..7684d9c 100644
--- a/lib/got_lib_deltify.h
+++ b/lib/got_lib_deltify.h
@@ -18,7 +18,7 @@
 struct got_delta_block {
 	off_t		len;
 	off_t		offset;
-	uint64_t	hash;
+	uint32_t	hash;
 };
 
 struct got_delta_table {