You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2015/11/06 22:10:57 UTC

svn commit: r1713040 - /httpd/httpd/trunk/server/core.c

Author: jailletc36
Date: Fri Nov  6 21:10:57 2015
New Revision: 1713040

URL: http://svn.apache.org/viewvc?rev=1713040&view=rev
Log:
Save a few bytes in conf pool when processing 'AllowOverrideList'.

The 'override_list' table is allocated from the cmd->pool, just as all strings from argv[].
So there is no need to duplicate them.

+ some minor style issues

Modified:
    httpd/httpd/trunk/server/core.c

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1713040&r1=1713039&r2=1713040&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Fri Nov  6 21:10:57 2015
@@ -1805,7 +1805,7 @@ static const char *set_override_list(cmd
 
     d->override_list = apr_table_make(cmd->pool, argc);
 
-    for (i=0;i<argc;i++){
+    for (i = 0; i < argc; i++) {
         if (!strcasecmp(argv[i], "None")) {
             if (argc != 1) {
                 return "'None' not allowed with other directives in "
@@ -1816,6 +1816,7 @@ static const char *set_override_list(cmd
         else {
             const command_rec *result = NULL;
             module *mod = ap_top_module;
+
             result = ap_find_command_in_modules(argv[i], &mod);
             if (result == NULL) {
                 ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
@@ -1834,7 +1835,7 @@ static const char *set_override_list(cmd
                 continue;
             }
             else {
-                apr_table_set(d->override_list, argv[i], "1");
+                apr_table_setn(d->override_list, argv[i], "1");
             }
         }
     }