You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christophe Jaillet <ch...@wanadoo.fr> on 2005/12/06 20:13:27 UTC
[Patch] cleanup in 'modules/aaa/mod_authnz_ldap.c'
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";