From: Christophe Jaillet Date: Thu, 10 Dec 2015 20:03:36 +0000 (+0000) Subject: Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable in order to save a... X-Git-Tag: 2.5.0-alpha~2549 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4df64266958e843ecc66c15e4521219cb2bb8e95;p=thirdparty%2Fapache%2Fhttpd.git Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable in order to save a few cycles. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1719189 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/config.c b/server/config.c index aea1ff1dbd3..024c79e8144 100644 --- a/server/config.c +++ b/server/config.c @@ -1917,7 +1917,7 @@ static const char *process_resource_config_fnmatch(server_rec *s, /* find the first part of the filename */ rest = ap_strchr_c(fname, '/'); if (rest) { - fname = apr_pstrndup(ptemp, fname, rest - fname); + fname = apr_pstrmemdup(ptemp, fname, rest - fname); rest++; }