X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=smalloc.c;h=5ba20047b37676ec8659dffc53dd6459061a5e4d;hp=0c7c6df7bdd17992a5fa3c8acb6b53a769621009;hb=a1e7972d96ce1482aa43c2fcafd81d6c7f3c44d2;hpb=271067a6e278dafd62649257fe99ce536acfe7bb diff --git a/smalloc.c b/smalloc.c index 0c7c6df7..5ba20047 100644 --- a/smalloc.c +++ b/smalloc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -253,9 +254,9 @@ void scleanup(void) #ifdef SMALLOC_REDZONE static void *postred_ptr(struct block_hdr *hdr) { - unsigned long ptr; + uintptr_t ptr; - ptr = (unsigned long) hdr + hdr->size - sizeof(unsigned int); + ptr = (uintptr_t) hdr + hdr->size - sizeof(unsigned int); ptr = (ptr + int_mask) & ~int_mask; return (void *) ptr;