1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04: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:
Julien Chaffraix 2010-09-12 16:32:41 -07:00 committed by Daniel Stenberg
parent 69d7c48072
commit 5ea9e78bd7

View File

@ -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) {
do_sec_send(conn, fd, NULL, 0);
}
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;
}