diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2015-10-24 05:40:19 +0000 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2015-10-24 05:40:19 +0000 |
commit | 2493f2fc9e93095baf6584a50402d3cd6700bac9 (patch) | |
tree | 136850ee0f262e63090963211dcf386ca16adeea /threadproc | |
parent | d6f43956ed8e6fd886d845d30267b2f8e1201465 (diff) | |
download | apr-2493f2fc9e93095baf6584a50402d3cd6700bac9.tar.gz |
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/apr/apr/trunk@1710307 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r-- | threadproc/win32/proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c index cd48117a4..0357b0bd8 100644 --- a/threadproc/win32/proc.c +++ b/threadproc/win32/proc.c @@ -486,7 +486,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, * XXX progname must be NULL if this is a 16 bit app running in WOW */ if (progname[0] == '\"') { - progname = apr_pstrndup(pool, progname + 1, strlen(progname) - 2); + progname = apr_pstrmemdup(pool, progname + 1, strlen(progname) - 2); } if (attr->cmdtype == APR_PROGRAM || attr->cmdtype == APR_PROGRAM_ENV) { @@ -546,7 +546,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, return APR_EINVAL; } if (shellcmd[0] == '"') { - progname = apr_pstrndup(pool, shellcmd + 1, strlen(shellcmd) - 2); + progname = apr_pstrmemdup(pool, shellcmd + 1, strlen(shellcmd) - 2); } else { progname = shellcmd; @@ -588,7 +588,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, return APR_EINVAL; } if (shellcmd[0] == '"') { - progname = apr_pstrndup(pool, shellcmd + 1, strlen(shellcmd) - 2); + progname = apr_pstrmemdup(pool, shellcmd + 1, strlen(shellcmd) - 2); } else { progname = shellcmd; |