summaryrefslogtreecommitdiff
path: root/lib/sha1.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-08-02 05:22:22 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-08-02 05:22:22 +0000
commitdeda01980fed1467a0a573864a49a9cb45193ae6 (patch)
tree54e28f81b2649e4b6587bac9fd40239797b50926 /lib/sha1.c
parent5682fe455f57678dbc678fc45188d7435383db73 (diff)
downloadcoreutils-deda01980fed1467a0a573864a49a9cb45193ae6.tar.xz
(UNALIGNED_P): Use size_t; in practice, this is just as
good as uintptr_t in checking for alignments, and has fewer configuration hassles.
Diffstat (limited to 'lib/sha1.c')
-rw-r--r--lib/sha1.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index d2647877e..5790396b2 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -243,11 +243,7 @@ sha_process_bytes (const void *buffer, size_t len, struct sha_ctx *ctx)
{
#if !_STRING_ARCH_unaligned
# define alignof(type) offsetof (struct { char c; type x; }, x)
-# ifdef UINTPTR_MAX
-# define UNALIGNED_P(p) (((uintptr_t) p) % alignof (md5_uint32) != 0)
-# else
-# define UNALIGNED_P(p) 1
-# endif
+# define UNALIGNED_P(p) (((size_t) p) % alignof (md5_uint32) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
{