From 2568cfed2da753c25adb0b803672ee40e7eb6c65 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 25 Jun 2017 13:06:54 +0200 Subject: vtls: make sure all _data_pending() functions return bool This patch makes the signature of the _data_pending() functions consistent among the SSL backends, in preparation for unifying the way all SSL backends are accessed. Signed-off-by: Johannes Schindelin --- lib/vtls/mbedtls.c | 2 +- lib/vtls/mbedtls.h | 2 +- lib/vtls/polarssl.c | 2 +- lib/vtls/polarssl.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/vtls') diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 037babe38..1de4a8783 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -1002,7 +1002,7 @@ void Curl_mbedtls_cleanup(void) (void)Curl_polarsslthreadlock_thread_cleanup(); } -int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex) +bool Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex) { return mbedtls_ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0; } diff --git a/lib/vtls/mbedtls.h b/lib/vtls/mbedtls.h index 71d17a491..a8041bc56 100644 --- a/lib/vtls/mbedtls.h +++ b/lib/vtls/mbedtls.h @@ -31,7 +31,7 @@ /* Called on first use mbedTLS, setup threading if supported */ int Curl_mbedtls_init(void); void Curl_mbedtls_cleanup(void); -int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex); +bool Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex); CURLcode Curl_mbedtls_connect(struct connectdata *conn, int sockindex); diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c index 669091cb5..8b66a247d 100644 --- a/lib/vtls/polarssl.c +++ b/lib/vtls/polarssl.c @@ -865,7 +865,7 @@ void Curl_polarssl_cleanup(void) } -int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex) +bool Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex) { return ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0; } diff --git a/lib/vtls/polarssl.h b/lib/vtls/polarssl.h index 47af7b417..c7b184941 100644 --- a/lib/vtls/polarssl.h +++ b/lib/vtls/polarssl.h @@ -31,7 +31,7 @@ /* Called on first use PolarSSL, setup threading if supported */ int Curl_polarssl_init(void); void Curl_polarssl_cleanup(void); -int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex); +bool Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex); CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex); -- cgit v1.2.3