Re: [PATCH] crypto/drbg.c:remove unnecessary (void*) conversions

From: Eric Biggers
Date: Tue Aug 09 2022 - 14:23:33 EST


On Tue, Aug 09, 2022 at 05:14:52PM +0800, Dong Chuanjian wrote:
> struct crypto_cipher *tfm =
> - (struct crypto_cipher *)drbg->priv_data;
> + drbg->priv_data;

Might as well join this into one line.

>
> crypto_cipher_setkey(tfm, key, (drbg_keylen(drbg)));
> }
> @@ -1828,7 +1828,7 @@ static int drbg_kcapi_sym(struct drbg_state *drbg, unsigned char *outval,
> const struct drbg_string *in)
> {
> struct crypto_cipher *tfm =
> - (struct crypto_cipher *)drbg->priv_data;
> + drbg->priv_data;

Likewise.

- Eric