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:

committed by
Daniel Stenberg

parent
69d7c48072
commit
5ea9e78bd7
@@ -336,12 +336,14 @@ static ssize_t sec_write(struct connectdata *conn, int fd,
|
|||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
/* FIXME: fd should be a curl_socket_t */
|
||||||
Curl_sec_fflush_fd(struct connectdata *conn, int fd)
|
int Curl_sec_fflush_fd(struct connectdata *conn, int fd)
|
||||||
{
|
{
|
||||||
if(conn->data_prot != prot_clear) {
|
if(conn->data_prot == prot_clear)
|
||||||
do_sec_send(conn, fd, NULL, 0);
|
return 0;
|
||||||
}
|
|
||||||
|
/* Force a flush by trying to send no data */
|
||||||
|
do_sec_send(conn, fd, NULL, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user