diff options
| author | Paul Eggert | 2011-02-12 14:36:22 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-02-12 14:36:22 -0800 |
| commit | 33d605d0d1a5902ae1e8f9f9bed9e961233bbc43 (patch) | |
| tree | 8613ef5b1d73ff43ac5d963bee0d3417b98abba8 /src | |
| parent | aca6915a1d31be73aa9ed6436f71834efd2b8b20 (diff) | |
| download | emacs-33d605d0d1a5902ae1e8f9f9bed9e961233bbc43.tar.gz emacs-33d605d0d1a5902ae1e8f9f9bed9e961233bbc43.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/md5.c | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8ba7b61290e..4469297e32f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-02-12 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * md5.c (md5_process_bytes): Use sizeof, not __alignof__. | ||
| 4 | The difference doesn't matter here, in practice, and sizeof is | ||
| 5 | more portable to non-GCC compilers. Also, this makes the code | ||
| 6 | match the already-existing comment. | ||
| 7 | |||
| 1 | 2011-02-12 Andreas Schwab <schwab@linux-m68k.org> | 8 | 2011-02-12 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 9 | ||
| 3 | * process.c (create_process): Reset SIGPIPE handler in the child. | 10 | * 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) | |||
| 216 | size_t add = 128 - left_over > len ? len : 128 - left_over; | 216 | size_t add = 128 - left_over > len ? len : 128 - left_over; |
| 217 | 217 | ||
| 218 | /* Only put full words in the buffer. */ | 218 | /* Only put full words in the buffer. */ |
| 219 | add -= add % __alignof__ (md5_uint32); | 219 | add -= add % sizeof (md5_uint32); |
| 220 | 220 | ||
| 221 | memcpy (&ctx->buffer[left_over], buffer, add); | 221 | memcpy (&ctx->buffer[left_over], buffer, add); |
| 222 | ctx->buflen += add; | 222 | ctx->buflen += add; |
| @@ -427,4 +427,3 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) | |||
| 427 | ctx->C = C; | 427 | ctx->C = C; |
| 428 | ctx->D = D; | 428 | ctx->D = D; |
| 429 | } | 429 | } |
| 430 | |||