chiark
/
gitweb
/
~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
progs/..., symm/...: Fix 32-bit right-shift idiom.
[catacomb]
/
symm
/
sha512.c
diff --git
a/symm/sha512.c
b/symm/sha512.c
index a9a5180c63bea8a39e855b6f873fb1c00cdf9612..5c75eb8ee8268c93db4d9bd50e95c08f6421eb8d 100644
(file)
--- a/
symm/sha512.c
+++ b/
symm/sha512.c
@@
-275,7
+275,7
@@
void sha512_set(sha512_ctx *ctx, const void *buf, unsigned long count)
LOAD64_(ctx->h, p + 56);
ctx->off = 0;
ctx->nl = U32(count);
- ctx->nh = U32(((count & ~MASK32) >> 16) >> 16);
+ ctx->nh = U32(((count & ~
(unsigned long)
MASK32) >> 16) >> 16);
}
/* --- @sha512_hash@, @sha384_hash@ --- *