mirror of
https://github.com/moparisthebest/curl
synced 2024-11-10 11:35:07 -05:00
security.c: Curl_sec_fflush_fd tweaks
- Use an early return as it makes the code more readable. - Added a FIXME about a conversion.
This commit is contained in:
parent
69d7c48072
commit
5ea9e78bd7
@ -336,12 +336,14 @@ static ssize_t sec_write(struct connectdata *conn, int fd,
|
||||
return tx;
|
||||
}
|
||||
|
||||
int
|
||||
Curl_sec_fflush_fd(struct connectdata *conn, int fd)
|
||||
/* FIXME: fd should be a curl_socket_t */
|
||||
int Curl_sec_fflush_fd(struct connectdata *conn, int fd)
|
||||
{
|
||||
if(conn->data_prot != prot_clear) {
|
||||
if(conn->data_prot == prot_clear)
|
||||
return 0;
|
||||
|
||||
/* Force a flush by trying to send no data */
|
||||
do_sec_send(conn, fd, NULL, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user