]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix C90 forbids mixed declarations and code.
authorPaul Querna <pquerna@apache.org>
Sun, 21 Dec 2008 22:58:56 +0000 (22:58 +0000)
committerPaul Querna <pquerna@apache.org>
Sun, 21 Dec 2008 22:58:56 +0000 (22:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@728547 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/balancers/mod_lbmethod_heartbeat.c

index 48fec263ac01383effb79f0af14f23bc86e681d3..571c0e70b49cd2a72ed06d7c284225cbd019f2c8 100644 (file)
@@ -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);