diff --git a/extras/http_client_ota/http_buffered_client.c b/extras/http_client_ota/http_buffered_client.c
index ef792a6..2d6e276 100644
--- a/extras/http_client_ota/http_buffered_client.c
+++ b/extras/http_client_ota/http_buffered_client.c
@@ -110,7 +110,8 @@ static inline void parse_http_header(char *header)
 HTTP_Client_State HttpClient_dowload(Http_client_info *info)
 {
     struct addrinfo *res;
-    unsigned int tot_http_pdu_rd, read_byte, full;
+    unsigned int tot_http_pdu_rd, full;
+    ssize_t read_byte;
     int err, sock;
     char *wrt_ptr;