* key.c (check_selects): Initialize retry to FALSE every time we enter

the do/while loop (bug introduced when incorrectly rewriting the
	backward goto used by the original submitter).
This commit is contained in:
Leonard den Ottolander 2006-08-12 10:06:22 +00:00
parent fc061342f4
commit 01d80ec3c7
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2006-08-12 Leonard den Ottolander <leonard den ottolander nl>
* key.c (check_selects): Initialize retry to FALSE every time we enter
the do/while loop (bug introduced when incorrectly rewriting the
backward goto used by the original submitter).
2006-08-11 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
* key.c (check_selects): Fix possible crash on reference to select list

View File

@ -179,12 +179,13 @@ inline static int add_selects (fd_set *select_set)
static void check_selects (fd_set *select_set)
{
SelectList *p;
gboolean retry = FALSE;
gboolean retry;
if (disabled_channels)
return;
do
do {
retry = FALSE;
for (p = select_list; p; p = p->next)
if (FD_ISSET (p->fd, select_set)) {
FD_CLR (p->fd, select_set);
@ -193,7 +194,7 @@ static void check_selects (fd_set *select_set)
break;
} else
retry = FALSE;
while (retry);
} while (retry);
}
void channels_down (void)