Fix assumption that pointers fits in a 'long'
[fio.git] / hash.h
diff --git a/hash.h b/hash.h
index 0c3cdda77be642842337f6fe949da7c24581e661..4b8c6bf0bcc49bd9b1f1b56c38c6e6b6243df22e 100644 (file)
--- a/hash.h
+++ b/hash.h
@@ -58,7 +58,7 @@ static inline unsigned long hash_long(unsigned long val, unsigned int bits)
        
 static inline unsigned long hash_ptr(void *ptr, unsigned int bits)
 {
-       return hash_long((unsigned long)ptr, bits);
+       return hash_long((uintptr_t)ptr, bits);
 }
 
 /*