[Pkg-javascript-commits] [node-sha.js] 172/237: sha1: format sha1_kt similar to sha1_ft for clarity

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:03:51 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 c18e7eb5ea14c7f5bb99f2664b04e132feeff296
Author: Daniel Cousens <github at dcousens.com>
Date:   Mon Jan 12 17:11:42 2015 +1100

    sha1: format sha1_kt similar to sha1_ft for clarity
---
 sha1.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sha1.js b/sha1.js
index 032430c..8ed76a9 100644
--- a/sha1.js
+++ b/sha1.js
@@ -46,8 +46,10 @@ function sha1_ft(t, b, c, d) {
  * Determine the appropriate additive constant for the current iteration
  */
 function sha1_kt(t) {
-    return (t < 20) ?  1518500249 : (t < 40) ?  1859775393 :
-           (t < 60) ? -1894007588 : -899497514;
+  if (t < 20) return 1518500249
+  if (t < 40) return 1859775393
+  if (t < 60) return -1894007588
+  return -899497514
 }
 
 /*

-- 
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