]> granicus.if.org Git - apache/commitdiff
Save a few bytes in the conf pool.
authorChristophe Jaillet <jailletc36@apache.org>
Tue, 21 Mar 2017 23:05:52 +0000 (23:05 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Tue, 21 Mar 2017 23:05:52 +0000 (23:05 +0000)
'push_item' and 'add_alt' already duplicate their parameters, so we can safely use the temp_pool here.

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

modules/generators/mod_autoindex.c

index eb5a4f78a418cbe0ebddb22a7d2fb52ed18795fa..9473a87e4d4b7db4c3a66d630edfe859919a12e1 100644 (file)
@@ -231,7 +231,7 @@ static const char *add_alt(cmd_parms *cmd, void *d, const char *alt,
         }
     }
     if (cmd->info == BY_ENCODING) {
-        char *tmp = apr_pstrdup(cmd->pool, to);
+        char *tmp = apr_pstrdup(cmd->temp_pool, to);
         ap_str_tolower(tmp);
         to = tmp;
     }
@@ -244,7 +244,7 @@ static const char *add_alt(cmd_parms *cmd, void *d, const char *alt,
 static const char *add_icon(cmd_parms *cmd, void *d, const char *icon,
                             const char *to)
 {
-    char *iconbak = apr_pstrdup(cmd->pool, icon);
+    char *iconbak = apr_pstrdup(cmd->temp_pool, icon);
 
     if (icon[0] == '(') {
         char *alt;
@@ -253,7 +253,7 @@ static const char *add_icon(cmd_parms *cmd, void *d, const char *icon,
         if (cl == NULL) {
             return "missing closing paren";
         }
-        alt = ap_getword_nc(cmd->pool, &iconbak, ',');
+        alt = ap_getword_nc(cmd->temp_pool, &iconbak, ',');
         *cl = '\0';                             /* Lose closing paren */
         add_alt(cmd, d, &alt[1], to);
     }
@@ -263,7 +263,7 @@ static const char *add_icon(cmd_parms *cmd, void *d, const char *icon,
         }
     }
     if (cmd->info == BY_ENCODING) {
-        char *tmp = apr_pstrdup(cmd->pool, to);
+        char *tmp = apr_pstrdup(cmd->temp_pool, to);
         ap_str_tolower(tmp);
         to = tmp;
     }