diff options
author | Jim Meyering <jim@meyering.net> | 2005-03-29 19:01:34 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-03-29 19:01:34 +0000 |
commit | 68bc3503b86cfaa3b1d827eac654eb463f60eca4 (patch) | |
tree | 283fdef63bf0102cb4dac4f7f8e5b652d204e2f2 | |
parent | 24e7f6c2482be6ee3d46efbc995a2e17819566e1 (diff) | |
download | coreutils-68bc3503b86cfaa3b1d827eac654eb463f60eca4.tar.xz |
(ptr_align): Declare `ptr' parameter to be a
`const' pointer, since this function never writes through it.
-rw-r--r-- | src/system.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/system.h b/src/system.h index 9916696c5..fb8152536 100644 --- a/src/system.h +++ b/src/system.h @@ -803,11 +803,11 @@ lcm (size_t u, size_t v) locations. */ static inline void * -ptr_align (void *ptr, size_t alignment) +ptr_align (void const *ptr, size_t alignment) { - char *p0 = ptr; - char *p1 = p0 + alignment - 1; - return p1 - (size_t) p1 % alignment; + char const *p0 = ptr; + char const *p1 = p0 + alignment - 1; + return (void *) (p1 - (size_t) p1 % alignment); } /* Verify a requirement at compile-time (unlike assert, which is runtime). */ |