mirror of
https://github.com/curl/curl.git
synced 2026-07-30 22:58:03 +03:00
cleaned up Curl_write() and the sub functions it uses for various protocols.
They all now return ssize_t to Curl_write(). Unfortunately, Curl_read() is in a sorrier state but it too would benefit from a similar cleanup.
This commit is contained in:
parent
4eb35406f4
commit
be0d17e812
8 changed files with 79 additions and 66 deletions
10
lib/ssluse.c
10
lib/ssluse.c
|
|
@ -1702,10 +1702,10 @@ Curl_ossl_connect(struct connectdata *conn,
|
|||
}
|
||||
|
||||
/* return number of sent (non-SSL) bytes */
|
||||
int Curl_ossl_send(struct connectdata *conn,
|
||||
int sockindex,
|
||||
void *mem,
|
||||
size_t len)
|
||||
ssize_t Curl_ossl_send(struct connectdata *conn,
|
||||
int sockindex,
|
||||
void *mem,
|
||||
size_t len)
|
||||
{
|
||||
/* SSL_write() is said to return 'int' while write() and send() returns
|
||||
'size_t' */
|
||||
|
|
@ -1741,7 +1741,7 @@ int Curl_ossl_send(struct connectdata *conn,
|
|||
failf(conn->data, "SSL_write() return error %d\n", err);
|
||||
return -1;
|
||||
}
|
||||
return rc; /* number of bytes */
|
||||
return (ssize_t)rc; /* number of bytes */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue