From: Brian Pane Date: Sun, 2 Dec 2001 20:38:33 +0000 (+0000) Subject: Optimization: replace apr_pstrndup() with apr_pstrmemdup() in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88f65cdc596b4cd256fca7996962ceccace19479;p=apache 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 9de5a83916..71b42f8b66 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++)