projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strcpy: kill last of the suspect ones
[fio.git]
/
memalign.c
diff --git
a/memalign.c
b/memalign.c
index 87667b42c35c7bea3f5d4c5d3e3a7a60c8a94539..7a04ffd8c31aa38443034fa300942bb8adf2259e 100644
(file)
--- a/
memalign.c
+++ b/
memalign.c
@@
-1,5
+1,6
@@
#include <stdlib.h>
#include <assert.h>
#include <stdlib.h>
#include <assert.h>
+#include <inttypes.h>
#include "memalign.h"
#include "memalign.h"
@@
-8,7
+9,7
@@
struct align_footer {
};
#define PTR_ALIGN(ptr, mask) \
};
#define PTR_ALIGN(ptr, mask) \
- (char *) (((u
nsigned long
) ((ptr) + (mask)) & ~(mask)))
+ (char *) (((u
intptr_t
) ((ptr) + (mask)) & ~(mask)))
void *fio_memalign(size_t alignment, size_t size)
{
void *fio_memalign(size_t alignment, size_t size)
{
@@
-21,7
+22,7
@@
void *fio_memalign(size_t alignment, size_t size)
if (ptr) {
ret = PTR_ALIGN(ptr, alignment);
f = ret + size;
if (ptr) {
ret = PTR_ALIGN(ptr, alignment);
f = ret + size;
- f->offset = (u
nsigned long) ret - (unsigned long
) ptr;
+ f->offset = (u
intptr_t) ret - (uintptr_t
) ptr;
}
return ret;
}
return ret;