summaryrefslogtreecommitdiff
path: root/modules/metadata/mod_setenvif.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/metadata/mod_setenvif.c')
-rw-r--r--modules/metadata/mod_setenvif.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c
index 78eb5c76d6..bf2e0ec02e 100644
--- a/modules/metadata/mod_setenvif.c
+++ b/modules/metadata/mod_setenvif.c
@@ -172,11 +172,12 @@ static int is_header_regex(apr_pool_t *p, const char* name)
*/
regex_t *preg = ap_pregcomp(p, "^[-A-Za-z0-9_]*$",
(REG_EXTENDED | REG_NOSUB ));
- if (preg) {
- if (ap_regexec(preg, name, 0, NULL, 0)) {
- return 1;
- }
+ ap_assert(preg != NULL);
+
+ if (ap_regexec(preg, name, 0, NULL, 0)) {
+ return 1;
}
+
return 0;
}