Commit 5ea9e78b authored by Julien Chaffraix's avatar Julien Chaffraix Committed by Daniel Stenberg
Browse files

security.c: Curl_sec_fflush_fd tweaks

- Use an early return as it makes the code more readable.
- Added a FIXME about a conversion.
parent 69d7c480
Loading
Loading
Loading
Loading
+7 −5
Original line number Original line Diff line number Diff line
@@ -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)
    return 0;

  /* Force a flush by trying to send no data */
  do_sec_send(conn, fd, NULL, 0);
  do_sec_send(conn, fd, NULL, 0);
  }
  return 0;
  return 0;
}
}