aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-10-13 19:14:39 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-10-13 22:10:12 +0200
commita626fa128cff4a3ac7dd4097328a6d38e659c025 (patch)
treef1add711d4764136ee194f5ebf73f9a8336a504a
parentbe16d8d9942afd23d9cad1fc5e80b0e90535cfff (diff)
security: silence conversion warning
With MinGW-w64, `curl_socket_t` is is a 32 or 64 bit unsigned integer, while `read` expects a 32 bit signed integer. Use `sread` instead of `read` to use the correct parameter type. Closes https://github.com/curl/curl/pull/4483
-rw-r--r--lib/security.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/security.c b/lib/security.c
index c5e4e135d..fbfa70741 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -236,7 +236,7 @@ static ssize_t sec_recv(struct connectdata *conn, int sockindex,
/* Handle clear text response. */
if(conn->sec_complete == 0 || conn->data_prot == PROT_CLEAR)
- return read(fd, buffer, len);
+ return sread(fd, buffer, len);
if(conn->in_buffer.eof_flag) {
conn->in_buffer.eof_flag = 0;