summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2010-09-19 20:54:34 +0000
committerJeff Trawick <trawick@apache.org>2010-09-19 20:54:34 +0000
commit15734940adae6ea9b660a9595ca359c078640bc3 (patch)
treed7460f8add8caa19b89c56c69c1c2cf53cd6241a /support
parenta20a0acb17248304fcfc542d8ebf6d54b1d4d05e (diff)
downloadhttpd-15734940adae6ea9b660a9595ca359c078640bc3.tar.gz
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
Diffstat (limited to 'support')
-rw-r--r--support/ab.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/support/ab.c b/support/ab.c
index 69f8312aa0..75af00a735 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)) {