mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-18 01:28:42 +00:00
mod_http_cache: Fix last remaining C99-style for loop.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
This commit is contained in:
parent
b256cf5695
commit
addcddc1ae
@ -698,6 +698,7 @@ static cached_url_t *cached_url_create(url_cache_t *cache, const char *url)
|
|||||||
char *dirname = NULL;
|
char *dirname = NULL;
|
||||||
cached_url_t *u = NULL;
|
cached_url_t *u = NULL;
|
||||||
const char *file_extension = "";
|
const char *file_extension = "";
|
||||||
|
const char *ext = NULL;
|
||||||
|
|
||||||
if (zstr(url)) {
|
if (zstr(url)) {
|
||||||
return NULL;
|
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);
|
switch_dir_make_recursive(dirname, SWITCH_DEFAULT_DIR_PERMS, cache->pool);
|
||||||
|
|
||||||
/* find extension on the end of URL */
|
/* 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 == '\\') {
|
if (*ext == '/' || *ext == '\\') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user