files_log_ref_write: new function
[gitweb.git] / sha1_file.c
index 50896ff1eb5ce3f216b31658b4a03d6e7fdc5adb..c5b31de9aa579dde37e5345d207995416f261eed 100644 (file)
@@ -2126,7 +2126,7 @@ static unsigned long pack_entry_hash(struct packed_git *p, off_t base_offset)
 {
        unsigned long hash;
 
-       hash = (unsigned long)p + (unsigned long)base_offset;
+       hash = (unsigned long)(intptr_t)p + (unsigned long)base_offset;
        hash += (hash >> 8) + (hash >> 16);
        return hash % MAX_DELTA_CACHE;
 }