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 <li...@horizon.com>
---
 crypto/ansi_cprng.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index 62b8f958..d4106e54 100644
--- a/crypto/ansi_cprng.c
+++ b/crypto/ansi_cprng.c
@@ -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;
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to