Commit 33d605d0 authored by Paul Eggert's avatar Paul Eggert
Browse files

* md5.c (md5_process_bytes): Use sizeof, not __alignof__.

The difference doesn't matter here, in practice, and sizeof is
more portable to non-GCC compilers.  Also, this makes the code
match the already-existing comment.
parent aca6915a
2011-02-12 Paul Eggert <eggert@cs.ucla.edu>
* md5.c (md5_process_bytes): Use sizeof, not __alignof__.
The difference doesn't matter here, in practice, and sizeof is
more portable to non-GCC compilers. Also, this makes the code
match the already-existing comment.
2011-02-12 Andreas Schwab <schwab@linux-m68k.org>
 
* process.c (create_process): Reset SIGPIPE handler in the child.
......@@ -216,7 +216,7 @@ md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
size_t add = 128 - left_over > len ? len : 128 - left_over;
/* Only put full words in the buffer. */
add -= add % __alignof__ (md5_uint32);
add -= add % sizeof (md5_uint32);
memcpy (&ctx->buffer[left_over], buffer, add);
ctx->buflen += add;
......@@ -427,4 +427,3 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
ctx->C = C;
ctx->D = D;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment