Commit ff23cd9f authored by Ken Brown's avatar Ken Brown

* src/xgselect.c (xg_select): Fix first argument in call to 'select' (bug#11508).

parent e1939eb1
2012-05-21 Ken Brown <kbrown@cornell.edu>
* xgselect.c (xg_select): Fix first argument in call to 'select'
(bug#11508).
2012-05-20 Ken Brown <kbrown@cornell.edu>
* gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
......
......@@ -33,7 +33,7 @@ static GPollFD *gfds;
static ptrdiff_t gfds_size;
int
xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
EMACS_TIME *timeout)
{
SELECT_TYPE all_rfds, all_wfds;
......@@ -41,11 +41,11 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
GMainContext *context;
int have_wfds = wfds != NULL;
int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0;
int i, nfds, fds_lim, tmo_in_millisec;
int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0, max_fds = fds_lim - 1;
int i, nfds, tmo_in_millisec;
if (!x_in_use)
return select (max_fds, rfds, wfds, efds, timeout);
return select (fds_lim, rfds, wfds, efds, timeout);
if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds));
else FD_ZERO (&all_rfds);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment