From: Paul Eggert Date: Mon, 2 Aug 2004 05:19:30 +0000 (+0000) Subject: (UNALIGNED_P): Use size_t; in practice, this is just as X-Git-Tag: v5.3.0~986 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa0a7d5865c74260009f373da4216c2c83866c77;p=thirdparty%2Fcoreutils.git (UNALIGNED_P): Use size_t; in practice, this is just as good as uintptr_t in checking for alignments, and has fewer configuration hassles. --- diff --git a/lib/md5.c b/lib/md5.c index 78a1e2bbc1..b938e1ca95 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -245,11 +245,7 @@ md5_process_bytes (const void *buffer, size_t len, struct md5_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) {