Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: libiberty/sha1.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libiberty/regex.c ('k') | libiberty/simple-object.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libiberty/sha1.c
diff --git a/libiberty/sha1.c b/libiberty/sha1.c
index 6a25ab239925aa21ebbbd29708b00120b4b77849..617e743a15e8dfea47e4fc325044e0309153150c 100644
--- a/libiberty/sha1.c
+++ b/libiberty/sha1.c
@@ -300,8 +300,7 @@ sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx)
length of the file up to 2^64 bits. Here we only compute the
number of bytes. Do a double word increment. */
ctx->total[0] += len;
- if (ctx->total[0] < len)
- ++ctx->total[1];
+ ctx->total[1] += ((len >> 31) >> 1) + (ctx->total[0] < len);
#define rol(x, n) (((x) << (n)) | ((sha1_uint32) (x) >> (32 - (n))))
« no previous file with comments | « libiberty/regex.c ('k') | libiberty/simple-object.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698