httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r998729 - /httpd/httpd/trunk/support/ab.c
Date Sun, 19 Sep 2010 20:54:34 GMT
Author: trawick
Date: Sun Sep 19 20:54:34 2010
New Revision: 998729

URL: http://svn.apache.org/viewvc?rev=998729&view=rev
Log:
simplify walking through array of returned apr_pollfd_t

Modified:
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=998729&r1=998728&r2=998729&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Sun Sep 19 20:54:34 2010
@@ -1728,7 +1728,7 @@ static void test(void)
 
     do {
         apr_int32_t n;
-        const apr_pollfd_t *pollresults;
+        const apr_pollfd_t *pollresults, *pollfd;
 
         n = concurrency;
         do {
@@ -1737,11 +1737,10 @@ static void test(void)
         if (status != APR_SUCCESS)
             apr_err("apr_pollset_poll", status);
 
-        for (i = 0; i < n; i++) {
-            const apr_pollfd_t *next_fd = &(pollresults[i]);
+        for (i = 0, pollfd = pollresults; i < n; i++, pollfd++) {
             struct connection *c;
 
-            c = next_fd->client_data;
+            c = pollfd->client_data;
 
             /*
              * If the connection isn't connected how can we check it?
@@ -1749,7 +1748,7 @@ static void test(void)
             if (c->state == STATE_UNCONNECTED)
                 continue;
 
-            rtnev = next_fd->rtnevents;
+            rtnev = pollfd->rtnevents;
 
 #ifdef USE_SSL
             if (c->state == STATE_CONNECTED && c->ssl && SSL_in_init(c->ssl))
{



Mime
View raw message