@@ -152,11 +152,11 @@ static int _get_more_prng_bytes(struct prng_context *ctx, bool cont_test)
}
/* Our exported functions */
-static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx,
- bool do_cont_test)
+static int get_prng_bytes(char *buf, unsigned int nbytes,
+ struct prng_context *ctx, bool do_cont_test)
{
unsigned char *ptr = buf;
- unsigned int byte_count = (unsigned int)nbytes;
+ unsigned int byte_count = nbytes;
int err;
@@ -244,7 +244,7 @@ static void free_prng_context(struct prng_context *ctx)
}
static int reset_prng_context(struct prng_context *ctx,
- unsigned char *key, size_t klen,
+ unsigned char *key, unsigned int klen,
unsigned char *V, unsigned char *DT)
{
int ret;
The public crypto API uses "unsigned int", but the internals used a mixture of that and size_t, which are different sizes on 64 bits. This shuts up a GCC warning about printf format. Signed-off-by: George Spelvin <linux@horizon.com> --- crypto/ansi_cprng.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)