summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/tcp_http.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp
index b2a6b0c04..be5a2c39a 100644
--- a/src/network/core/tcp_http.cpp
+++ b/src/network/core/tcp_http.cpp
@@ -250,8 +250,8 @@ int NetworkHTTPSocketHandler::Receive()
/* Wait till we read the end-of-header identifier */
if (this->recv_length == 0) {
- int read = this->recv_pos + res;
- int end = min(read, lengthof(this->recv_buffer) - 1);
+ ssize_t read = this->recv_pos + res;
+ ssize_t end = std::min<ssize_t>(read, lengthof(this->recv_buffer) - 1);
/* Do a 'safe' search for the end of the header. */
char prev = this->recv_buffer[end];
@@ -272,7 +272,7 @@ int NetworkHTTPSocketHandler::Receive()
this->recv_length = ret;
end_of_header += strlen(END_OF_HEADER);
- int len = min(read - (end_of_header - this->recv_buffer), res);
+ int len = std::min(read - (end_of_header - this->recv_buffer), res);
if (len != 0) {
this->callback->OnReceiveData(end_of_header, len);
this->recv_length -= len;
@@ -281,7 +281,7 @@ int NetworkHTTPSocketHandler::Receive()
this->recv_pos = 0;
}
} else {
- res = min(this->recv_length, res);
+ res = std::min<ssize_t>(this->recv_length, res);
/* Receive whatever we're expecting. */
this->callback->OnReceiveData(this->recv_buffer, res);
this->recv_length -= res;