httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Jaillet" <christophe.jail...@wanadoo.fr>
Subject Re: Merging branch authz-dev - Authorization and Access Control2.3 vs. 2.2
Date Sat, 07 Jan 2006 12:52:10 GMT
Hi,

as you are about to merge changes from this branch, i posted a small cleanup
patch a few weeks ago that never went to the trunk. Basically, it replace a
apr_palloc/strcpy/strcat sequence, with only one apr_pstrcat call.

I also submit it to you in case you think it is usefull, correct and can be
merged with your work.

(as the patch is done against the trunk, line number should be wrong in your
branch)

CJ


-------8<--------8<--------8<--------8<--------8<-

Hi,

a few weeks ago I noticed that 'modules/aaa/mod_authnz_ldap.c' could be
cleaned up a little. Now here is the patch.

Regards,
 CJ


Index: modules/aaa/mod_authnz_ldap.c
===================================================================
--- modules/aaa/mod_authnz_ldap.c (révision 366700)
+++ modules/aaa/mod_authnz_ldap.c (copie de travail)
@@ -864,11 +864,7 @@

     /* Set all the values, or at least some sane defaults */
     if (sec->host) {
-        char *p = apr_palloc(cmd->pool, strlen(sec->host) +
strlen(urld->lud_host) + 2);
-        strcpy(p, urld->lud_host);
-        strcat(p, " ");
-        strcat(p, sec->host);
-        sec->host = p;
+        sec->host = apr_pstrcat(cmd->pool, urld->lud_host, " ", sec->host,
NULL);
     }
     else {
         sec->host = urld->lud_host? apr_pstrdup(cmd->pool, urld->lud_host)
: "localhost";







Mime
View raw message