mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
45943a58df
commit
f072f0e0fe
1 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue