public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	davem@davemloft.net, herbert@gondor.apana.org.au
Subject: Re: [PATCH] crypto: Cleaning some more minor nits in prng
Date: Thu, 17 Jul 2008 11:43:33 -0700	[thread overview]
Message-ID: <1216320213.8292.105.camel@localhost> (raw)
In-Reply-To: <20080717183012.GF17892@hmsendeavour.rdu.redhat.com>

On Thu, 2008-07-17 at 14:30 -0400, Neil Horman wrote:
> diff --git a/crypto/prng.c b/crypto/prng.c
> index 9e2d277..0b1831e 100644
>  {
>  	int ret;
> @@ -313,6 +313,9 @@ int reset_prng_context(struct prng_context *ctx,
>  
>  	prng_key = (key != NULL) ? key : (unsigned char *)DEFAULT_PRNG_KEY;
>  
> +	if (!key)
> +		klen = DEFAULT_PRNG_KSZ;
> +
>  	if (V)
>  		memcpy(ctx->V, V, DEFAULT_BLK_SZ);
>  	else

Perhaps more readable as:

	if (key)
		prng_key = key;
	else {
		prng_key = DEFAULT_PRNG_KEY;		
		klen = DEFAULT_PRNG_KSZ;
	}



      reply	other threads:[~2008-07-17 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 18:30 [PATCH] crypto: Cleaning some more minor nits in prng Neil Horman
2008-07-17 18:43 ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1216320213.8292.105.camel@localhost \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox