summaryrefslogtreecommitdiffstats
path: root/modules/proxy/balancers/mod_lbmethod_heartbeat.c
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2008-12-21 23:58:56 +0100
committerPaul Querna <pquerna@apache.org>2008-12-21 23:58:56 +0100
commit5eb866768d7361cd6e7b5373962c8e2e586ab24e (patch)
tree49cdd6cb30967abafd19d0171bfd8290db944a04 /modules/proxy/balancers/mod_lbmethod_heartbeat.c
parentFix mixed declarations and code. (diff)
downloadapache2-5eb866768d7361cd6e7b5373962c8e2e586ab24e.tar.xz
apache2-5eb866768d7361cd6e7b5373962c8e2e586ab24e.zip
Fix C90 forbids mixed declarations and code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@728547 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/balancers/mod_lbmethod_heartbeat.c')
-rw-r--r--modules/proxy/balancers/mod_lbmethod_heartbeat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
index 48fec263ac..571c0e70b4 100644
--- a/modules/proxy/balancers/mod_lbmethod_heartbeat.c
+++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
@@ -108,6 +108,7 @@ static apr_status_t read_heartbeats(const char *path, apr_hash_t *servers,
hb_server_t *server;
char buf[4096];
apr_size_t bsize = sizeof(buf);
+ const char *ip;
apr_brigade_cleanup(tmpbb);
@@ -142,7 +143,7 @@ static apr_status_t read_heartbeats(const char *path, apr_hash_t *servers,
continue;
}
- const char *ip = apr_pstrndup(pool, buf, t - buf);
+ ip = apr_pstrndup(pool, buf, t - buf);
t++;
server = apr_hash_get(servers, ip, APR_HASH_KEY_STRING);