diff options
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r-- | libguile/filesys.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c index 35e15cba8..273de9790 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -650,19 +650,15 @@ set_element (fd_set *set, SCM *ports_ready, SCM element, int pos) SCM_ASSERT (SCM_OPFPORTP (element), element, pos, "select"); if (pos == SCM_ARG1) { - /* check whether port has buffered input. */ - scm_t_port_internal *pti = SCM_PORT_GET_INTERNAL (element); - - if (scm_port_buffer_can_take (pti->read_buf) > 0) + /* Check whether port has input buffered. */ + if (scm_port_buffer_can_take (SCM_PORT (element)->read_buf) > 0) use_buf = 1; } else if (pos == SCM_ARG2) { - /* check whether port's output buffer has room. */ - scm_t_port_internal *pti = SCM_PORT_GET_INTERNAL (element); - - /* > 1 since writing the last byte in the buffer causes flush. */ - if (scm_port_buffer_can_put (pti->write_buf) > 1) + /* Check whether port's output buffer has room. > 1 since + writing the last byte in the buffer causes flush. */ + if (scm_port_buffer_can_put (SCM_PORT (element)->write_buf) > 1) use_buf = 1; } fd = use_buf ? -1 : SCM_FPORT_FDES (element); |