[PATCH] use proper value for the first argument of select ()

Hello, there! :)

The attached patch changes all select () calls in MC which look like
this - select (FD_SETSIZE, ...) - to select (max_fd + 1, ...).

While searching for such call I found the following code in

            FD_ZERO (&select_set);
            FD_SET (error_pipe[0], &select_set);
            timeout.tv_sec = 0;
            timeout.tv_usec = 0;
            select (FD_SETSIZE, &select_set, 0, 0, &timeout);
>>>>>       if (!FD_ISSET (0, &select_set))
            read (error_pipe[0], error + len, 1);
The marked line seemed wrong to me and I've changed it to:
           if (!FD_ISSET (error_pipe[0], &select_set))

That change is also included in the patch.


Pavel Tsekov

Attachment: mc-select-1st-arg.diff
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]