diff options
author | jailletc36 <jailletc36@13f79535-47bb-0310-9956-ffa450edef68> | 2015-10-24 05:40:19 +0000 |
---|---|---|
committer | jailletc36 <jailletc36@13f79535-47bb-0310-9956-ffa450edef68> | 2015-10-24 05:40:19 +0000 |
commit | 1dbaedb450bbc27b0e206012df05c22ba93615fa (patch) | |
tree | 136850ee0f262e63090963211dcf386ca16adeea /user/win32/userinfo.c | |
parent | 54ce4e3210dbf5bef561dcd17afc577d342a6bc8 (diff) | |
download | libapr-1dbaedb450bbc27b0e206012df05c22ba93615fa.tar.gz |
Use 'apr_pstrmemdup' instead of 'apr_pstrndup' when applicable in order to save a few cycles.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1710307 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user/win32/userinfo.c')
-rw-r--r-- | user/win32/userinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c index 12931ade6..c6b5084a5 100644 --- a/user/win32/userinfo.c +++ b/user/win32/userinfo.c @@ -212,11 +212,11 @@ APR_DECLARE(apr_status_t) apr_uid_get(apr_uid_t *uid, apr_gid_t *gid, char *pos; if ((pos = strchr(username, '/'))) { - domain = apr_pstrndup(p, username, pos - username); + domain = apr_pstrmemdup(p, username, pos - username); username = pos + 1; } else if ((pos = strchr(username, '\\'))) { - domain = apr_pstrndup(p, username, pos - username); + domain = apr_pstrmemdup(p, username, pos - username); username = pos + 1; } else { |