(ptr_align): Use size_t; in practice, this is just as

good as uintptr_t in checking for alignments, and has fewer
configuration hassles.
This commit is contained in:
Paul Eggert
2004-08-02 05:26:19 +00:00
parent 45e8d9f87b
commit 08eeecbbbb
+1 -1
View File
@@ -810,5 +810,5 @@ ptr_align (void *ptr, size_t alignment)
{
char *p0 = ptr;
char *p1 = p0 + alignment - 1;
return p1 - (uintptr_t) p1 % alignment;
return p1 - (size_t) p1 % alignment;
}