summaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorTakashi Sato <takashi@apache.org>2008-12-16 01:08:01 +0100
committerTakashi Sato <takashi@apache.org>2008-12-16 01:08:01 +0100
commit4975fd3583b510f5962f215156c3c73756f570c8 (patch)
tree359203fb6775bae8f5b1c07d72b6b78ceaf134fb /support
parentcore.xml: Clarify the Location and LocationMatch directive doc to emphasize (diff)
downloadapache2-4975fd3583b510f5962f215156c3c73756f570c8.tar.xz
apache2-4975fd3583b510f5962f215156c3c73756f570c8.zip
* Change some "apr_palloc / memcpy" to apr_pstrmemdup
PR: 39519 Submitted by: Christophe JAILLET <christophe.jaillet wanadoo.fr> * Remove unnecessary casts git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726884 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r--support/ab.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/support/ab.c b/support/ab.c
index 95b48a4fc0..4a35903228 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -1892,9 +1892,7 @@ static int parse_url(char *url)
if ((cp = strchr(url, '/')) == NULL)
return 1;
- h = apr_palloc(cntxt, cp - url + 1);
- memcpy(h, url, cp - url);
- h[cp - url] = '\0';
+ h = apr_pstrmemdup(cntxt, url, cp - url);
rv = apr_parse_addr_port(&hostname, &scope_id, &port, h, cntxt);
if (rv != APR_SUCCESS || !hostname || scope_id) {
return 1;