Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
97107e2e
Commit
97107e2e
authored
May 09, 2012
by
Paul Eggert
Browse files
* xgselect.c (xg_select): Put maxfds+1 into a var.
This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
parent
12959e8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
src/ChangeLog
src/ChangeLog
+3
-0
src/xgselect.c
src/xgselect.c
+4
-4
No files found.
src/ChangeLog
View file @
97107e2e
2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
* xgselect.c (xg_select): Put maxfds+1 into a var.
This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
* sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
2012-05-10 Dave Abrahams <dave@boostpro.com>
...
...
src/xgselect.c
View file @
97107e2e
...
...
@@ -41,7 +41,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
GMainContext
*
context
=
g_main_context_default
();
int
have_wfds
=
wfds
!=
NULL
;
int
n_gfds
=
0
,
our_tmo
=
0
,
retval
=
0
,
our_fds
=
0
;
int
i
,
nfds
,
tmo_in_millisec
;
int
i
,
nfds
,
fds_lim
,
tmo_in_millisec
;
if
(
rfds
)
memcpy
(
&
all_rfds
,
rfds
,
sizeof
(
all_rfds
));
else
FD_ZERO
(
&
all_rfds
);
...
...
@@ -97,14 +97,14 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
if
(
our_tmo
)
tmop
=
&
tmo
;
}
n
fds
=
select
(
max_fds
+
1
,
&
all_rfds
,
have_wfds
?
&
all_wfds
:
NULL
,
efds
,
tmop
);
fds
_lim
=
max_fds
+
1
;
nfds
=
select
(
fds_lim
,
&
all_rfds
,
have_wfds
?
&
all_wfds
:
NULL
,
efds
,
tmop
);
if
(
nfds
<
0
)
retval
=
nfds
;
else
if
(
nfds
>
0
)
{
for
(
i
=
0
;
i
<
max_fds
+
1
;
++
i
)
for
(
i
=
0
;
i
<
fds_lim
;
++
i
)
{
if
(
FD_ISSET
(
i
,
&
all_rfds
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment