]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_http_cache: Fix last remaining C99-style for loop.
authorStefan Knoblich <stkn@openisdn.net>
Sat, 14 Jul 2012 22:31:08 +0000 (00:31 +0200)
committerStefan Knoblich <stkn@openisdn.net>
Sat, 14 Jul 2012 22:37:35 +0000 (00:37 +0200)
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
src/mod/applications/mod_http_cache/mod_http_cache.c

index aec7be684d017f27ef2e1c97b47223a2af0f4b07..856f2be0a1235ca3e545018fa0688d5e44b054f3 100644 (file)
@@ -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;
                }