1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

Small fix to scm_getc: Move FD_ZERO into the select loop

This commit is contained in:
Mikael Djurfeldt 1998-01-30 21:02:36 +00:00
parent 6905611f41
commit a3ec616e42

View file

@ -116,9 +116,9 @@ scm_getc (port)
int n;
SELECT_TYPE readfds;
int fd = fileno ((FILE *) f);
FD_ZERO (&readfds);
do
{
FD_ZERO (&readfds);
FD_SET (fd, &readfds);
n = scm_internal_select (fd + 1, &readfds, NULL, NULL, NULL);
}