summaryrefslogtreecommitdiff
path: root/poll
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2003-01-03 17:47:07 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2003-01-03 17:47:07 +0000
commita7662c76e0f20165e0544f54effdaaef6f40004c (patch)
tree8e9c9b48fec2e4a05e53907f2dae732c0052abc2 /poll
parent4557f226f7e5856aefc0b559d11166743ddd009b (diff)
downloadlibapr-a7662c76e0f20165e0544f54effdaaef6f40004c.tar.gz
Simplify select-based apr_poll to avoid an extra for loop and clear
rtnevents whilst building the fd_set. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64262 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r--poll/unix/poll.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index 899aa71ab..a0aeaca36 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -217,6 +217,8 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
for (i = 0; i < num; i++) {
apr_os_sock_t fd;
+ aprset[i].rtnevents = 0;
+
if (aprset[i].desc_type == APR_POLL_SOCKET) {
#ifdef NETWARE
if (HAS_PIPES(set_type)) {
@@ -275,10 +277,6 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
}
#endif
- for (i = 0; i < num; i++) {
- aprset[i].rtnevents = 0;
- }
-
(*nsds) = rv;
if ((*nsds) == 0) {
return APR_TIMEUP;