diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index d4badeb9067b1dd4dfe295c5d69d103e75ca7677..1a34f5ec69a136a0813e7d72ee9e049bd568a46c 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -96,8 +96,8 @@ void Curl_httpchunk_init(struct connectdata *conn)
  */
 CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
                               char *datap,
-                              ssize_t length,
-                              ssize_t *wrote)
+                              size_t length,
+                              size_t *wrote)
 {
   CURLcode result;
   struct Curl_chunker *ch = &conn->proto.http->chunk;