]> granicus.if.org Git - apache/commitdiff
Constify + save a few bytes in conf pool
authorChristophe Jaillet <jailletc36@apache.org>
Tue, 2 Jun 2015 05:54:58 +0000 (05:54 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Tue, 2 Jun 2015 05:54:58 +0000 (05:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1683047 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 3ee9efe19621f1e3e7df2ae83ce51fb5e8c9781e..c65d029383fae57b2ef2c0d2f76e34b997c9a2b4 100644 (file)
@@ -66,9 +66,9 @@ typedef struct deflate_filter_config_t
     int memlevel;
     int compressionlevel;
     int bufferSize;
-    char *note_ratio_name;
-    char *note_input_name;
-    char *note_output_name;
+    const char *note_ratio_name;
+    const char *note_input_name;
+    const char *note_output_name;
     int etag_opt;
 } deflate_filter_config;
 
@@ -267,16 +267,16 @@ static const char *deflate_set_note(cmd_parms *cmd, void *dummy,
                                                     &deflate_module);
 
     if (arg2 == NULL) {
-        c->note_ratio_name = apr_pstrdup(cmd->pool, arg1);
+        c->note_ratio_name = arg1;
     }
     else if (!strcasecmp(arg1, "ratio")) {
-        c->note_ratio_name = apr_pstrdup(cmd->pool, arg2);
+        c->note_ratio_name = arg2;
     }
     else if (!strcasecmp(arg1, "input")) {
-        c->note_input_name = apr_pstrdup(cmd->pool, arg2);
+        c->note_input_name = arg2;
     }
     else if (!strcasecmp(arg1, "output")) {
-        c->note_output_name = apr_pstrdup(cmd->pool, arg2);
+        c->note_output_name = arg2;
     }
     else {
         return apr_psprintf(cmd->pool, "Unknown note type %s", arg1);