diff options
author | Stephan Mueller <smueller@chronox.de> | 2014-08-17 17:38:58 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-08-25 20:34:10 +0800 |
commit | f072f0e0fe0f3758c7c94bee875564c89fd07d08 (patch) | |
tree | b673a3f2c2c6d150add68867580cb077a31af679 /crypto | |
parent | 45943a58df46b912685af26000e4dbacddd9c567 (diff) | |
download | op-kernel-dev-f072f0e0fe0f3758c7c94bee875564c89fd07d08.zip op-kernel-dev-f072f0e0fe0f3758c7c94bee875564c89fd07d08.tar.gz |
crypto: drbg - remove superflowous memset(0)
Remove memset(0) which is not needed due to the kzalloc of the memory.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/drbg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c index 212d260..86cffc6 100644 --- a/crypto/drbg.c +++ b/crypto/drbg.c @@ -728,11 +728,9 @@ static int drbg_hmac_update(struct drbg_state *drbg, struct list_head *seed, LIST_HEAD(seedlist); LIST_HEAD(vdatalist); - if (!reseed) { - /* 10.1.2.3 step 2 */ - memset(drbg->C, 0, drbg_statelen(drbg)); + if (!reseed) + /* 10.1.2.3 step 2 -- memset(0) of C is implicit with kzalloc */ memset(drbg->V, 1, drbg_statelen(drbg)); - } drbg_string_fill(&seed1, drbg->V, drbg_statelen(drbg)); list_add_tail(&seed1.list, &seedlist); |