]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(ptr_align): Use size_t; in practice, this is just as
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 05:26:19 +0000 (05:26 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 05:26:19 +0000 (05:26 +0000)
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.

src/system.h

index 16354754a7d91869b7e489bc9702b939a508ad4d..a24e66f8f48935480c8a7566dd431e67c01e9ca6 100644 (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;
 }