httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1688343 - /httpd/httpd/trunk/modules/filters/mod_substitute.c
Date Tue, 30 Jun 2015 02:40:10 GMT
Author: wrowe
Date: Tue Jun 30 02:40:09 2015
New Revision: 1688343

URL: http://svn.apache.org/r1688343
Log:
Net -8 LoC, my usual specialty.

This didn't need to be reinvented; please use established helpers.


Modified:
    httpd/httpd/trunk/modules/filters/mod_substitute.c

Modified: httpd/httpd/trunk/modules/filters/mod_substitute.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_substitute.c?rev=1688343&r1=1688342&r2=1688343&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_substitute.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_substitute.c Tue Jun 30 02:40:09 2015
@@ -701,15 +701,6 @@ static const char *set_max_line_length(c
     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}
 };



Mime
View raw message