From f80c14d64dd9e1264fc92901fd94c4160174392b Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Tue, 30 Jun 2015 02:40:09 +0000 Subject: [PATCH] Net -8 LoC, my usual specialty. This didn't need to be reinvented; please use established helpers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1688343 13f79535-47bb-0310-9956-ffa450edef68 --- modules/filters/mod_substitute.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/filters/mod_substitute.c b/modules/filters/mod_substitute.c index e3101933d7..8762197520 100644 --- a/modules/filters/mod_substitute.c +++ b/modules/filters/mod_substitute.c @@ -701,15 +701,6 @@ static const char *set_max_line_length(cmd_parms *cmd, void *cfg, const char *ar return NULL; } -static const char *set_inherit_before(cmd_parms *cmd, void *cfg, int flag) -{ - subst_dir_conf *dcfg = (subst_dir_conf *)cfg; - - dcfg->inherit_before = (flag != 0); - - return NULL; -} - #define PROTO_FLAGS AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH static void register_hooks(apr_pool_t *pool) { @@ -722,7 +713,8 @@ static const command_rec substitute_cmds[] = { "Pattern to filter the response content (s/foo/bar/[inf])"), AP_INIT_TAKE1("SubstituteMaxLineLength", set_max_line_length, NULL, OR_FILEINFO, "Maximum line length"), - AP_INIT_FLAG("SubstituteInheritBefore", set_inherit_before, NULL, OR_FILEINFO, + AP_INIT_FLAG("SubstituteInheritBefore", ap_set_flag_slot, + (void *)APR_OFFSETOF(subst_dir_conf, inherit_before), OR_FILEINFO, "Apply inherited patterns before those of the current context"), {NULL} }; -- 2.40.0