]> granicus.if.org Git - apache/commitdiff
* server/config.c, include/http_config.h (ap_build_cont_config,
authorJoe Orton <jorton@apache.org>
Thu, 9 Mar 2017 09:48:24 +0000 (09:48 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 9 Mar 2017 09:48:24 +0000 (09:48 +0000)
  ap_soak_end_container): Constify directive arguments - existing
  callers pass string literals.

* server/core.c (start_cond_section): Remove casts needed for above.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1786120 13f79535-47bb-0310-9956-ffa450edef68

include/http_config.h
server/config.c
server/core.c

index 582cb243b5a327ab29f1a166b1d539b86b8e9c7b..758ba7a108d2d4beb5f6a4643c9f39c6dd109609 100644 (file)
@@ -858,7 +858,7 @@ AP_DECLARE(const char *) ap_pcfg_strerror(apr_pool_t *p, ap_configfile_t *cfp,
  * @note If cmd->pool == cmd->temp_pool, ap_soak_end_container() will assume
  *       .htaccess context and use a lower maximum line length.
  */
-AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive);
+AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, const char *directive);
 
 /**
  * Read all data between the current &lt;foo&gt; and the matching &lt;/foo&gt; and build
@@ -878,7 +878,7 @@ AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
                                               cmd_parms *parms,
                                               ap_directive_t **current,
                                               ap_directive_t **curr_parent,
-                                              char *orig_directive);
+                                              const char *orig_directive);
 
 /**
  * Build a config tree from a config file
index 5af0e2d2de4f4950a0ab8de3d1e466198ced87f3..475c064e1d3a8e2638dbe73a990b393f0bd4142f 100644 (file)
@@ -1242,7 +1242,7 @@ AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
                                               cmd_parms *parms,
                                               ap_directive_t **current,
                                               ap_directive_t **curr_parent,
-                                              char *orig_directive)
+                                              const char *orig_directive)
 {
     char *bracket;
     const char *retval;
@@ -1615,7 +1615,7 @@ AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *file)
 }
 
 
-AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive)
+AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, const char *directive)
 {
     struct ap_varbuf vb;
     const char *args;
index 2ae5b6e3e987a8f054700c8a49e68d34ab9d0cff..113fe537ef2e30850c155406fcc9cbb086757d6a 100644 (file)
@@ -2802,13 +2802,13 @@ static const char *start_cond_section(cmd_parms *cmd, void *mconfig, const char
         const char *retval;
 
         retval = ap_build_cont_config(cmd->pool, cmd->temp_pool, cmd,
-                                      &current, &parent, (char *)cmd->cmd->name);
+                                      &current, &parent, cmd->cmd->name);
         *(ap_directive_t **)mconfig = current;
         return retval;
     }
     else {
         *(ap_directive_t **)mconfig = NULL;
-        return ap_soak_end_container(cmd, (char *)cmd->cmd->name);
+        return ap_soak_end_container(cmd, cmd->cmd->name);
     }
 }