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

lib/sha1.c

index d2647877eb15513a71cd950412d502f060465f3b..5790396b2e77ff90ab3d7835a24fb29bdb77994c 100644 (file)
@@ -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)
          {