mirror of
https://github.com/curl/curl.git
synced 2026-08-25 05:43:32 +03:00
lib: unify recv/send function signatures
cfilter/conn: change send/recv function signatures. Unify the calling/return conventions in our send/receive handling. Curl_conn_recv(), adjust pnread type Parameter `pnread` was a `ssize_t *`, but `size_t *` is better since the function returns any error in its `CURLcode` return value. Closes #17546
This commit is contained in:
parent
3934431421
commit
20c90ba298
37 changed files with 1114 additions and 1219 deletions
|
|
@ -211,7 +211,7 @@ static ssize_t xfer_recv_resp(struct Curl_easy *data,
|
|||
bool eos_reliable,
|
||||
CURLcode *err)
|
||||
{
|
||||
ssize_t nread;
|
||||
size_t nread;
|
||||
|
||||
DEBUGASSERT(blen > 0);
|
||||
/* If we are reading BODY data and the connection does NOT handle EOF
|
||||
|
|
@ -252,8 +252,7 @@ static ssize_t xfer_recv_resp(struct Curl_easy *data,
|
|||
}
|
||||
DEBUGF(infof(data, "sendrecv_dl: we are done"));
|
||||
}
|
||||
DEBUGASSERT(nread >= 0);
|
||||
return nread;
|
||||
return (ssize_t)nread;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -954,7 +953,7 @@ CURLcode Curl_xfer_send(struct Curl_easy *data,
|
|||
|
||||
CURLcode Curl_xfer_recv(struct Curl_easy *data,
|
||||
char *buf, size_t blen,
|
||||
ssize_t *pnrcvd)
|
||||
size_t *pnrcvd)
|
||||
{
|
||||
int sockindex;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue