Index: uspace/lib/http/src/headers.c
===================================================================
--- uspace/lib/http/src/headers.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/http/src/headers.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -94,5 +94,5 @@
 }
 
-int http_header_receive_name(receive_buffer_t *rb,
+errno_t http_header_receive_name(receive_buffer_t *rb,
     receive_buffer_mark_t *name_end)
 {
@@ -102,5 +102,5 @@
 			recv_mark_update(rb, name_end);
 		
-		int rc = recv_char(rb, &c, true);
+		errno_t rc = recv_char(rb, &c, true);
 		if (rc != EOK)
 			return rc;
@@ -113,8 +113,8 @@
 }
 
-int http_header_receive_value(receive_buffer_t *rb,
+errno_t http_header_receive_value(receive_buffer_t *rb,
     receive_buffer_mark_t *value_start, receive_buffer_mark_t *value_end)
 {
-	int rc = EOK;
+	errno_t rc = EOK;
 	char c = 0;
 	
@@ -167,5 +167,5 @@
 }
 
-int http_header_receive(receive_buffer_t *rb, http_header_t *header,
+errno_t http_header_receive(receive_buffer_t *rb, http_header_t *header,
     size_t size_limit, size_t *out_bytes_used)
 {
@@ -176,5 +176,5 @@
 	recv_mark(rb, &mark_end);
 	
-	int rc = http_header_receive_name(rb, &mark_end);
+	errno_t rc = http_header_receive_name(rb, &mark_end);
 	if (rc != EOK)
 		goto end;
@@ -259,5 +259,5 @@
 }
 
-int http_headers_find_single(http_headers_t *headers, const char *name,
+errno_t http_headers_find_single(http_headers_t *headers, const char *name,
     http_header_t **out_header)
 {
@@ -282,5 +282,5 @@
 }
 
-int http_headers_append(http_headers_t *headers, const char *name,
+errno_t http_headers_append(http_headers_t *headers, const char *name,
     const char *value)
 {
@@ -293,9 +293,9 @@
 }
 
-int http_headers_set(http_headers_t *headers, const char *name,
+errno_t http_headers_set(http_headers_t *headers, const char *name,
     const char *value)
 {
 	http_header_t *header = NULL;
-	int rc = http_headers_find_single(headers, name, &header);
+	errno_t rc = http_headers_find_single(headers, name, &header);
 	if (rc != EOK && rc != HTTP_EMISSING_HEADER)
 		return rc;
@@ -313,8 +313,8 @@
 }
 
-int http_headers_get(http_headers_t *headers, const char *name, char **value)
+errno_t http_headers_get(http_headers_t *headers, const char *name, char **value)
 {
 	http_header_t *header = NULL;
-	int rc = http_headers_find_single(headers, name, &header);
+	errno_t rc = http_headers_find_single(headers, name, &header);
 	if (rc != EOK)
 		return rc;
@@ -324,8 +324,8 @@
 }
 
-int http_headers_receive(receive_buffer_t *rb, http_headers_t *headers,
+errno_t http_headers_receive(receive_buffer_t *rb, http_headers_t *headers,
     size_t limit_alloc, unsigned limit_count)
 {
-	int rc = EOK;
+	errno_t rc = EOK;
 	unsigned added = 0;
 	
Index: uspace/lib/http/src/http.c
===================================================================
--- uspace/lib/http/src/http.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/http/src/http.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -47,5 +47,5 @@
 #include <http/receive-buffer.h>
 
-static int http_receive(void *client_data, void *buf, size_t buf_size,
+static errno_t http_receive(void *client_data, void *buf, size_t buf_size,
     size_t *nrecv)
 {
@@ -69,5 +69,5 @@
 	
 	http->buffer_size = 4096;
-	int rc = recv_buffer_init(&http->recv_buffer, http->buffer_size,
+	errno_t rc = recv_buffer_init(&http->recv_buffer, http->buffer_size,
 	    http_receive, http);
 	if (rc != EOK) {
@@ -79,10 +79,10 @@
 }
 
-int http_connect(http_t *http)
+errno_t http_connect(http_t *http)
 {
 	if (http->conn != NULL)
 		return EBUSY;
 	
-	int rc = inet_host_plookup_one(http->host, ip_any, &http->addr, NULL,
+	errno_t rc = inet_host_plookup_one(http->host, ip_any, &http->addr, NULL,
 	    NULL);
 	if (rc != EOK)
@@ -110,5 +110,5 @@
 }
 
-int http_close(http_t *http)
+errno_t http_close(http_t *http)
 {
 	if (http->conn == NULL)
Index: uspace/lib/http/src/receive-buffer.c
===================================================================
--- uspace/lib/http/src/receive-buffer.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/http/src/receive-buffer.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -43,5 +43,5 @@
 #include <http/receive-buffer.h>
 
-int recv_buffer_init(receive_buffer_t *rb, size_t buffer_size,
+errno_t recv_buffer_init(receive_buffer_t *rb, size_t buffer_size,
     receive_func_t receive, void *client_data)
 {
@@ -61,5 +61,5 @@
 }
 
-static int dummy_receive(void *unused, void *buf, size_t buf_size,
+static errno_t dummy_receive(void *unused, void *buf, size_t buf_size,
     size_t *nrecv)
 {
@@ -68,7 +68,7 @@
 }
 
-int recv_buffer_init_const(receive_buffer_t *rb, void *buf, size_t size)
-{
-	int rc = recv_buffer_init(rb, size, dummy_receive, NULL);
+errno_t recv_buffer_init_const(receive_buffer_t *rb, void *buf, size_t size)
+{
+	errno_t rc = recv_buffer_init(rb, size, dummy_receive, NULL);
 	if (rc != EOK)
 		return rc;
@@ -107,5 +107,5 @@
 }
 
-int recv_cut(receive_buffer_t *rb, receive_buffer_mark_t *a, receive_buffer_mark_t *b, void **out_buf, size_t *out_size)
+errno_t recv_cut(receive_buffer_t *rb, receive_buffer_mark_t *a, receive_buffer_mark_t *b, void **out_buf, size_t *out_size)
 {
 	if (a->offset > b->offset)
@@ -123,5 +123,5 @@
 }
 
-int recv_cut_str(receive_buffer_t *rb, receive_buffer_mark_t *a, receive_buffer_mark_t *b, char **out_buf)
+errno_t recv_cut_str(receive_buffer_t *rb, receive_buffer_mark_t *a, receive_buffer_mark_t *b, char **out_buf)
 {
 	if (a->offset > b->offset)
@@ -147,5 +147,5 @@
 
 /** Receive one character (with buffering) */
-int recv_char(receive_buffer_t *rb, char *c, bool consume)
+errno_t recv_char(receive_buffer_t *rb, char *c, bool consume)
 {
 	if (rb->out == rb->in) {
@@ -170,5 +170,5 @@
 		
 		size_t nrecv;
-		int rc = rb->receive(rb->client_data, rb->buffer + rb->in, free, &nrecv);
+		errno_t rc = rb->receive(rb->client_data, rb->buffer + rb->in, free, &nrecv);
 		if (rc != EOK)
 			return rc;
@@ -183,5 +183,5 @@
 }
 
-int recv_buffer(receive_buffer_t *rb, char *buf, size_t buf_size,
+errno_t recv_buffer(receive_buffer_t *rb, char *buf, size_t buf_size,
     size_t *nrecv)
 {
@@ -202,8 +202,8 @@
  * @return EOK or an error code
  */
-int recv_discard(receive_buffer_t *rb, char discard, size_t *ndisc)
+errno_t recv_discard(receive_buffer_t *rb, char discard, size_t *ndisc)
 {
 	char c = 0;
-	int rc = recv_char(rb, &c, false);
+	errno_t rc = recv_char(rb, &c, false);
 	if (rc != EOK)
 		return rc;
@@ -223,10 +223,10 @@
  * @return EOK or an error code
  */
-int recv_discard_str(receive_buffer_t *rb, const char *discard, size_t *ndisc)
+errno_t recv_discard_str(receive_buffer_t *rb, const char *discard, size_t *ndisc)
 {
 	size_t discarded = 0;
 	while (*discard) {
 		size_t nd;
-		int rc = recv_discard(rb, *discard, &nd);
+		errno_t rc = recv_discard(rb, *discard, &nd);
 		if (rc != EOK)
 			return rc;
@@ -241,9 +241,9 @@
 }
 
-int recv_while(receive_buffer_t *rb, char_class_func_t class)
+errno_t recv_while(receive_buffer_t *rb, char_class_func_t class)
 {
 	while (true) {
 		char c = 0;
-		int rc = recv_char(rb, &c, false);
+		errno_t rc = recv_char(rb, &c, false);
 		if (rc != EOK)
 			return rc;
@@ -266,8 +266,8 @@
  * @return EOK on success or an error code
  */
-int recv_eol(receive_buffer_t *rb, size_t *nrecv)
+errno_t recv_eol(receive_buffer_t *rb, size_t *nrecv)
 {
 	char c = 0;
-	int rc = recv_char(rb, &c, false);
+	errno_t rc = recv_char(rb, &c, false);
 	if (rc != EOK)
 		return rc;
@@ -292,5 +292,5 @@
 
 /* Receive a single line */
-int recv_line(receive_buffer_t *rb, char *line, size_t size, size_t *nrecv)
+errno_t recv_line(receive_buffer_t *rb, char *line, size_t size, size_t *nrecv)
 {
 	size_t written = 0;
@@ -299,5 +299,5 @@
 	while (written < size) {
 		char c = 0;
-		int rc = recv_char(rb, &c, true);
+		errno_t rc = recv_char(rb, &c, true);
 		if (rc != EOK)
 			return rc;
Index: uspace/lib/http/src/request.c
===================================================================
--- uspace/lib/http/src/request.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/http/src/request.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -90,5 +90,5 @@
 }
 
-int http_request_format(http_request_t *req, char **out_buf,
+errno_t http_request_format(http_request_t *req, char **out_buf,
     size_t *out_buf_size)
 {
@@ -141,10 +141,10 @@
 }
 
-int http_send_request(http_t *http, http_request_t *req)
+errno_t http_send_request(http_t *http, http_request_t *req)
 {
 	char *buf = NULL;
 	size_t buf_size = 0;
 	
-	int rc = http_request_format(req, &buf, &buf_size);
+	errno_t rc = http_request_format(req, &buf, &buf_size);
 	if (rc != EOK)
 		return rc;
Index: uspace/lib/http/src/response.c
===================================================================
--- uspace/lib/http/src/response.c	(revision cde999aca79219e8751af76502001a86d411d176)
+++ uspace/lib/http/src/response.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
@@ -47,5 +47,5 @@
 }
 
-static int receive_number(receive_buffer_t *rb, char **str)
+static errno_t receive_number(receive_buffer_t *rb, char **str)
 {
 	receive_buffer_mark_t start;
@@ -53,5 +53,5 @@
 	
 	recv_mark(rb, &start);
-	int rc = recv_while(rb, is_digit);
+	errno_t rc = recv_while(rb, is_digit);
 	if (rc != EOK) {
 		recv_unmark(rb, &start);
@@ -66,8 +66,8 @@
 }
 
-static int receive_uint8_t(receive_buffer_t *rb, uint8_t *out_value)
+static errno_t receive_uint8_t(receive_buffer_t *rb, uint8_t *out_value)
 {
 	char *str = NULL;
-	int rc = receive_number(rb, &str);
+	errno_t rc = receive_number(rb, &str);
 	
 	if (rc != EOK)
@@ -80,8 +80,8 @@
 }
 
-static int receive_uint16_t(receive_buffer_t *rb, uint16_t *out_value)
+static errno_t receive_uint16_t(receive_buffer_t *rb, uint16_t *out_value)
 {
 	char *str = NULL;
-	int rc = receive_number(rb, &str);
+	errno_t rc = receive_number(rb, &str);
 	
 	if (rc != EOK)
@@ -94,8 +94,8 @@
 }
 
-static int expect(receive_buffer_t *rb, const char *expect)
+static errno_t expect(receive_buffer_t *rb, const char *expect)
 {
 	size_t ndisc;
-	int rc = recv_discard_str(rb, expect, &ndisc);
+	errno_t rc = recv_discard_str(rb, expect, &ndisc);
 	if (rc != EOK)
 		return rc;
@@ -110,5 +110,5 @@
 }
 
-int http_receive_status(receive_buffer_t *rb, http_version_t *out_version,
+errno_t http_receive_status(receive_buffer_t *rb, http_version_t *out_version,
     uint16_t *out_status, char **out_message)
 {
@@ -117,5 +117,5 @@
 	char *message = NULL;
 	
-	int rc = expect(rb, "HTTP/");
+	errno_t rc = expect(rb, "HTTP/");
 	if (rc != EOK)
 		return rc;
@@ -187,5 +187,5 @@
 }
 
-int http_receive_response(receive_buffer_t *rb, http_response_t **out_response,
+errno_t http_receive_response(receive_buffer_t *rb, http_response_t **out_response,
     size_t max_headers_size, unsigned max_headers_count)
 {
@@ -196,5 +196,5 @@
 	http_headers_init(&resp->headers);
 	
-	int rc = http_receive_status(rb, &resp->version, &resp->status,
+	errno_t rc = http_receive_status(rb, &resp->version, &resp->status,
 	    &resp->message);
 	if (rc != EOK)
