From: Brian Pane Date: Sun, 2 Dec 2001 20:38:33 +0000 (+0000) Subject: Optimization: replace apr_pstrndup() with apr_pstrmemdup() in X-Git-Tag: 2.0.30~306 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aab420fe58be81e7e33583c1d985221a56d4002f;p=thirdparty%2Fapache%2Fhttpd.git Optimization: replace apr_pstrndup() with apr_pstrmemdup() in ap_escape_html() to eliminate a redundant scan through the string. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92288 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util.c b/server/util.c index 9de5a839162..71b42f8b66f 100644 --- a/server/util.c +++ b/server/util.c @@ -1649,7 +1649,7 @@ AP_DECLARE(char *) ap_escape_html(apr_pool_t *p, const char *s) j += 4; if (j == 0) - return apr_pstrndup(p, s, i); + return apr_pstrmemdup(p, s, i); x = apr_palloc(p, i + j + 1); for (i = 0, j = 0; s[i] != '\0'; i++, j++)