From: Jeff Trawick Date: Sun, 19 Sep 2010 20:54:34 +0000 (+0000) Subject: simplify walking through array of returned apr_pollfd_t X-Git-Tag: 2.3.9~476 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15734940adae6ea9b660a9595ca359c078640bc3;p=thirdparty%2Fapache%2Fhttpd.git simplify walking through array of returned apr_pollfd_t git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@998729 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index 69f8312aa0d..75af00a7356 100644 --- a/support/ab.c +++ b/support/ab.c @@ -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)) {