lkml.org 
[lkml]   [2008]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] crypto: Cleaning some more minor nits in prng
From
Date
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;
}




\
 
 \ /
  Last update: 2008-07-17 20:47    [W:0.039 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site