httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1683047 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Date Tue, 02 Jun 2015 05:54:59 GMT
Author: jailletc36
Date: Tue Jun  2 05:54:58 2015
New Revision: 1683047

URL: http://svn.apache.org/r1683047
Log:
Constify + save a few bytes in conf pool

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

Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?rev=1683047&r1=1683046&r2=1683047&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Tue Jun  2 05:54:58 2015
@@ -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_
                                                     &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);



Mime
View raw message