Mercurial > hg > octave-nkf > gnulib-hg
changeset 9796:4ee5860b30b8
Undo last change.
* lib/sha1.c, lib/md5.c: 63 != ~63.
Reported by Andreas Schwab.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sat, 15 Mar 2008 16:06:44 +0100 |
parents | bf79dbf4257f |
children | 81d3cc04d969 |
files | ChangeLog lib/md5.c lib/sha1.c |
diffstat | 3 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-03-15 Jim Meyering <meyering@redhat.com> + Undo last change. + * lib/sha1.c, lib/md5.c: 63 != ~63. + Reported by Andreas Schwab. + sha1.c, md5.c: Hoist a redundant expression. * lib/sha1.c (sha1_process_bytes): AND-off the low bits in "ctx->buflen" only once, before calling *_process_block.
--- a/lib/md5.c +++ b/lib/md5.c @@ -230,9 +230,9 @@ if (ctx->buflen > 64) { + md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx); + ctx->buflen &= 63; - md5_process_block (ctx->buffer, ctx->buflen, ctx); - /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63],
--- a/lib/sha1.c +++ b/lib/sha1.c @@ -217,9 +217,9 @@ if (ctx->buflen > 64) { + sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx); + ctx->buflen &= 63; - sha1_process_block (ctx->buffer, ctx->buflen, ctx); - /* The regions in the following copy operation cannot overlap. */ memcpy (ctx->buffer, &((char *) ctx->buffer)[(left_over + add) & ~63],