[Pkg-gnupg-commit] [gnupg1] 20/35: cipher: Improve readability by using a macro.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Aug 29 14:48:41 UTC 2016


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

dkg pushed a commit to branch master
in repository gnupg1.

commit e23eec8c9a602eee0a09851a54db0f5d611f125c
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Aug 17 11:03:07 2016 +0200

    cipher: Improve readability by using a macro.
    
    * cipher/random.c (mix_pool): Use DIGESTLEN instead of 20.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 cipher/random.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cipher/random.c b/cipher/random.c
index 7549517..be2f51a 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -365,7 +365,7 @@ mix_pool(byte *pool)
     memcpy(hashbuf, pend - DIGESTLEN, DIGESTLEN );
     memcpy(hashbuf+DIGESTLEN, pool, BLOCKLEN-DIGESTLEN);
     rmd160_mixblock( &md, hashbuf);
-    memcpy(pool, hashbuf, 20 );
+    memcpy(pool, hashbuf, DIGESTLEN);
 
     p = pool;
     for( n=1; n < POOLBLOCKS; n++ ) {
@@ -384,7 +384,7 @@ mix_pool(byte *pool)
 	}
 
 	rmd160_mixblock( &md, hashbuf);
-	memcpy(p, hashbuf, 20 );
+	memcpy(p, hashbuf, DIGESTLEN);
     }
     burn_stack (384); /* for the rmd160_mixblock() */
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg1.git



More information about the Pkg-gnupg-commit mailing list