Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 69188 invoked by uid 500); 3 Jan 2003 17:47:08 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 69175 invoked from network); 3 Jan 2003 17:47:08 -0000 Date: 3 Jan 2003 17:47:07 -0000 Message-ID: <20030103174707.69359.qmail@icarus.apache.org> From: jorton@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/poll/unix poll.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jorton 2003/01/03 09:47:07 Modified: poll/unix poll.c Log: Simplify select-based apr_poll to avoid an extra for loop and clear rtnevents whilst building the fd_set. Revision Changes Path 1.36 +2 -4 apr/poll/unix/poll.c Index: poll.c =================================================================== RCS file: /home/cvs/apr/poll/unix/poll.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- poll.c 3 Jan 2003 17:06:07 -0000 1.35 +++ poll.c 3 Jan 2003 17:47:07 -0000 1.36 @@ -217,6 +217,8 @@ 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)) { @@ -274,10 +276,6 @@ #ifdef NETWARE } #endif - - for (i = 0; i < num; i++) { - aprset[i].rtnevents = 0; - } (*nsds) = rv; if ((*nsds) == 0) {