From: Paul Querna Date: Sun, 21 Dec 2008 22:58:56 +0000 (+0000) Subject: Fix C90 forbids mixed declarations and code. X-Git-Tag: 2.3.1~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5eb866768d7361cd6e7b5373962c8e2e586ab24e;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c index 48fec263ac0..571c0e70b49 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);