httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Jaillet" <christophe.jail...@wanadoo.fr>
Subject [Patch] cleanup in 'modules/aaa/mod_authnz_ldap.c'
Date Tue, 06 Dec 2005 19:13:27 GMT
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 354496)
+++ 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