[Pkg-javascript-commits] [node-sha.js] 13/31: hash: rm unnecessary _s state

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 30 11:23:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-sha.js.

commit 388d45ec3a040e7f6ffeecd077498baf32e270e9
Author: Daniel Cousens <github at dcousens.com>
Date:   Fri May 19 21:04:36 2017 +1000

    hash: rm unnecessary _s state
---
 hash.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hash.js b/hash.js
index 7c07d07..eea15ac 100644
--- a/hash.js
+++ b/hash.js
@@ -6,7 +6,6 @@ function Hash (blockSize, finalSize) {
   this._finalSize = finalSize
   this._blockSize = blockSize
   this._len = 0
-  this._s = 0
 }
 
 Hash.prototype.update = function (data, enc) {
@@ -15,8 +14,8 @@ Hash.prototype.update = function (data, enc) {
     data = new Buffer(data, enc)
   }
 
+  var s = this._len
   var l = this._len += data.length
-  var s = this._s || 0
   var f = 0
   var buffer = this._block
 
@@ -35,7 +34,6 @@ Hash.prototype.update = function (data, enc) {
       this._update(buffer)
     }
   }
-  this._s = s
 
   return this
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git



More information about the Pkg-javascript-commits mailing list