From addcddc1ae617e6a8aa69b4038fc4669a957b9b4 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Sun, 15 Jul 2012 00:31:08 +0200 Subject: [PATCH] mod_http_cache: Fix last remaining C99-style for loop. Signed-off-by: Stefan Knoblich --- src/mod/applications/mod_http_cache/mod_http_cache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_http_cache/mod_http_cache.c b/src/mod/applications/mod_http_cache/mod_http_cache.c index aec7be684d..856f2be0a1 100644 --- a/src/mod/applications/mod_http_cache/mod_http_cache.c +++ b/src/mod/applications/mod_http_cache/mod_http_cache.c @@ -698,6 +698,7 @@ static cached_url_t *cached_url_create(url_cache_t *cache, const char *url) char *dirname = NULL; cached_url_t *u = NULL; const char *file_extension = ""; + const char *ext = NULL; if (zstr(url)) { return NULL; @@ -716,7 +717,7 @@ static cached_url_t *cached_url_create(url_cache_t *cache, const char *url) switch_dir_make_recursive(dirname, SWITCH_DEFAULT_DIR_PERMS, cache->pool); /* find extension on the end of URL */ - for(const char *ext = &url[strlen(url) - 1]; ext != url; ext--) { + for (ext = &url[strlen(url) - 1]; ext != url; ext--) { if (*ext == '/' || *ext == '\\') { break; }