Commit 5362bfe0 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1711553, r1713040, r1683881 from trunk:

Constify + save a few bytes in conf pool

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

Save a few bytes in conf pool
Submitted by: jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1715015 13f79535-47bb-0310-9956-ffa450edef68
parent b8885db0
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -112,15 +112,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]


  *) synch 2.4.x with trunk
        mod_authn_anon: Constify + save a few bytes in conf pool
        core: Save a few bytes in conf pool when processing 'AllowOverrideList'
        mod_authnz_ldap: Save a few bytes in conf pool
     trunk patch: http://svn.apache.org/r1711553
                  http://svn.apache.org/r1713040
                  http://svn.apache.org/r1683881
     2.4.x patch: trunk works
     +1: jailletc36, icing, jim

PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@
#include "mod_auth.h"

typedef struct anon_auth_user {
    char *user;
    const char *user;
    struct anon_auth_user *next;
} anon_auth_user;

@@ -103,7 +103,7 @@ static const char *anon_set_string_slots(cmd_parms *cmd,
        else {
            first = conf->users;
            conf->users = apr_palloc(cmd->pool, sizeof(*conf->users));
            conf->users->user = apr_pstrdup(cmd->pool, arg);
            conf->users->user = arg;
            conf->users->next = first;
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -1627,7 +1627,7 @@ static const char *set_bind_pattern(cmd_parms *cmd, void *_cfg, const char *exp,
    }

    sec->bind_regex = regexp;
    sec->bind_subst = apr_pstrdup(cmd->pool, subst);
    sec->bind_subst = subst;

    return NULL;
}
+3 −2
Original line number Diff line number Diff line
@@ -1747,6 +1747,7 @@ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *c
        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,
@@ -1765,7 +1766,7 @@ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *c
                continue;
            }
            else {
                apr_table_set(d->override_list, argv[i], "1");
                apr_table_setn(d->override_list, argv[i], "1");
            }
        }
    }