diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-01-29 10:34:49 -0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-02-19 18:04:35 +0100 |
commit | f16e52b67c9261bdc7e1284a50502a802921ac6d (patch) | |
tree | 35f315919b8cbdf7c7d9b69617e09e07b979c00e /crypto/bio/bss_fd.c | |
parent | 5e128ed1209335fb72fe50a68640331e354cbea6 (diff) |
Correct the return value of BIO_get_ktls_*().
BIO_get_ktls_send() and BIO_get_ktls_recv() are documented as
returning either 0 or 1. However, they were actually returning the
internal value of the associated BIO flag for the true case instead of
1.
Also trim redundant ternary operators.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14023)
Diffstat (limited to 'crypto/bio/bss_fd.c')
-rw-r--r-- | crypto/bio/bss_fd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c index e1cb62d80c..f0498a0969 100644 --- a/crypto/bio/bss_fd.c +++ b/crypto/bio/bss_fd.c @@ -189,7 +189,7 @@ static long fd_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 1; break; case BIO_CTRL_EOF: - ret = (b->flags & BIO_FLAGS_IN_EOF) != 0 ? 1 : 0; + ret = (b->flags & BIO_FLAGS_IN_EOF) != 0; break; default: ret = 0; |