From: Jim Jagielski Date: Wed, 18 Nov 2015 16:15:29 +0000 (+0000) Subject: Merge r1711553, r1713040, r1683881 from trunk: X-Git-Tag: 2.4.18~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da0eea2b742c62d86e9b24da4d925f1438332b3d;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/STATUS b/STATUS index 6af0176b311..618d1f60061 100644 --- a/STATUS +++ b/STATUS @@ -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 ] diff --git a/modules/aaa/mod_authn_anon.c b/modules/aaa/mod_authn_anon.c index 21e0da8560c..82559bcc75e 100644 --- a/modules/aaa/mod_authn_anon.c +++ b/modules/aaa/mod_authn_anon.c @@ -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; } } diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c index 211e4f74850..370016f7097 100644 --- a/modules/aaa/mod_authnz_ldap.c +++ b/modules/aaa/mod_authnz_ldap.c @@ -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; } @@ -1655,7 +1655,7 @@ static const char *set_bind_password(cmd_parms *cmd, void *_cfg, const char *arg result = ap_get_exec_line(cmd->pool, (const char*)argv[0], (const char * const *)argv); - if(!result) { + if (!result) { return apr_pstrcat(cmd->pool, "Unable to get bind password from exec of ", arg+5, NULL); diff --git a/server/core.c b/server/core.c index 803d4d4b6d8..a56aab4cdfc 100644 --- a/server/core.c +++ b/server/core.c @@ -1736,7 +1736,7 @@ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *c d->override_list = apr_table_make(cmd->pool, argc); - for (i=0;iserver, @@ -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"); } } }