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

Unified Diff: base/md5.cc

Issue 1087333004: MD5: Remove unnecessary temporary 'inbuf' variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/md5.cc
diff --git a/base/md5.cc b/base/md5.cc
index eff5308ce910554f8fef8889b65146adced534a4..9709a86fcd166194d0a9547f6899b55140b70ebc 100644
--- a/base/md5.cc
+++ b/base/md5.cc
@@ -168,15 +168,13 @@ void MD5Init(MD5Context* context) {
* of bytes.
*/
void MD5Update(MD5Context* context, const StringPiece& data) {
- const uint8_t* inbuf = (const uint8_t*)data.data();
- size_t len = data.size();
struct Context* ctx = (struct Context*)context;
- const uint8_t* buf = (const uint8_t*)inbuf;
- uint32_t t;
+ const uint8_t* buf = (const uint8_t*)data.data();
+ size_t len = data.size();
/* Update bitcount */
- t = ctx->bits[0];
+ uint32_t t = ctx->bits[0];
if ((ctx->bits[0] = t + ((uint32_t)len << 3)) < t)
ctx->bits[1]++; /* Carry from low to high */
ctx->bits[1] += static_cast<uint32_t>(len >> 29);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698