* lib/sha1.c, lib/md5.c: 63 != ~63.
Reported by Andreas Schwab.
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.
if (ctx->buflen > 64)
{
- ctx->buflen &= 63;
- md5_process_block (ctx->buffer, ctx->buflen, ctx);
+ md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
+ ctx->buflen &= 63;
/* The regions in the following copy operation cannot overlap. */
memcpy (ctx->buffer,
&((char *) ctx->buffer)[(left_over + add) & ~63],
if (ctx->buflen > 64)
{
- ctx->buflen &= 63;
- sha1_process_block (ctx->buffer, ctx->buflen, ctx);
+ sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx);
+ ctx->buflen &= 63;
/* The regions in the following copy operation cannot overlap. */
memcpy (ctx->buffer,
&((char *) ctx->buffer)[(left_over + add) & ~63],