diff --git a/sha1.c b/sha1.c
index c3d37d6b50160c4a3a50af8527173d5fdc2e4e20..717d0abb38a85e3c0b0547b6064a1822e34c9b4a 100644
--- a/sha1.c
+++ b/sha1.c
@@ -260,7 +260,7 @@ sha1_block(struct sha1_ctx *ctx, const uint8_t *block)
 
 void
 sha1_update(struct sha1_ctx *ctx,
-	    uint32_t length, const uint8_t *buffer)
+	    unsigned length, const uint8_t *buffer)
 {
   if (ctx->index)
     { /* Try to fill partial block */