summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ssl.c
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2022-10-07 22:51:27 +1300
committerGitHub <noreply@github.com>2022-10-07 22:51:27 +1300
commita081fe76de5de0307651d99324a0e454fd8b8a8b (patch)
tree06d6a9a2b44aa950d72a0eff853a5984e9002c14 /ext/openssl/ossl_ssl.c
parente4f91bbdbaa6ab3125f24967414ac5300bb244f5 (diff)
Simplify default argument specification. (#6507)
Notes
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
Diffstat (limited to 'ext/openssl/ossl_ssl.c')
-rw-r--r--ext/openssl/ossl_ssl.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 605591efe5..319ba5840e 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -1641,21 +1641,15 @@ no_exception_p(VALUE opts)
return 0;
}
-inline static
-VALUE io_timeout()
-{
-#ifdef HAVE_RB_IO_TIMEOUT
- return Qundef;
-#else
- return Qnil;
+#ifndef RB_IO_TIMEOUT_DEFAULT
+#define RB_IO_TIMEOUT_DEFAULT Qnil
#endif
-}
static void
io_wait_writable(rb_io_t *fptr)
{
#ifdef HAVE_RB_IO_MAYBE_WAIT
- rb_io_maybe_wait_writable(errno, fptr->self, io_timeout());
+ rb_io_maybe_wait_writable(errno, fptr->self, RB_IO_TIMEOUT_DEFAULT);
#else
rb_io_wait_writable(fptr->fd);
#endif
@@ -1665,7 +1659,7 @@ static void
io_wait_readable(rb_io_t *fptr)
{
#ifdef HAVE_RB_IO_MAYBE_WAIT
- rb_io_maybe_wait_readable(errno, fptr->self, io_timeout());
+ rb_io_maybe_wait_readable(errno, fptr->self, RB_IO_TIMEOUT_DEFAULT);
#else
rb_io_wait_readable(fptr->fd);
#endif