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:
Daniel Stenberg 2006-11-11 21:34:43 +00:00
parent 4eb35406f4
commit be0d17e812
8 changed files with 79 additions and 66 deletions

View file

@ -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 */
}
/*