summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorChristophe Jaillet <jailletc36@apache.org>2019-02-10 10:14:37 +0000
committerChristophe Jaillet <jailletc36@apache.org>2019-02-10 10:14:37 +0000
commit33b2ad9f1cd2ea29146a7615128f6f7bd6b79deb (patch)
tree1b638dca86a0258a246e6f7845df15c9aaf29dd8 /server
parent20cb4baffce4c95da637ee968feb72b0fe3b673d (diff)
downloadhttpd-33b2ad9f1cd2ea29146a7615128f6f7bd6b79deb.tar.gz
Follow up to r1847430.
- These flags are not for apr_dir_ function. Clarify comment. - Initialize 'depth', especially when AP_DIR_FLAG_RECURSIVE is explicitelly required. - Avoid an harmless over-allocation . git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853302 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/config.c1
-rw-r--r--server/util.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/server/config.c b/server/config.c
index dcadba0c66..13bc092269 100644
--- a/server/config.c
+++ b/server/config.c
@@ -1920,6 +1920,7 @@ AP_DECLARE(const char *) ap_process_fnmatch_configs(server_rec *s,
w.flags = (optional ? AP_DIR_FLAG_OPTIONAL : AP_DIR_FLAG_NONE) | AP_DIR_FLAG_RECURSIVE;
w.cb = process_resource_config_cb;
w.ctx = &cfgs;
+ w.depth = 0;
/* don't require conf/httpd.conf if we have a -C or -c switch */
if ((ap_server_pre_read_config->nelts
diff --git a/server/util.c b/server/util.c
index 691846d906..3693bfbff1 100644
--- a/server/util.c
+++ b/server/util.c
@@ -3459,13 +3459,13 @@ static int fname_alphasort(const void *fn1, const void *fn2)
const fnames *f1 = fn1;
const fnames *f2 = fn2;
- return strcmp(f1->fname,f2->fname);
+ return strcmp(f1->fname, f2->fname);
}
AP_DECLARE(ap_dir_match_t *)ap_dir_cfgmatch(cmd_parms *cmd, int flags,
const char *(*cb)(ap_dir_match_t *w, const char *fname), void *ctx)
{
- ap_dir_match_t *w = apr_palloc(cmd->temp_pool, sizeof(cmd_parms));
+ ap_dir_match_t *w = apr_palloc(cmd->temp_pool, sizeof(*w));
w->prefix = apr_pstrcat(cmd->pool, cmd->cmd->name, ": ", NULL);
w->p = cmd->pool;