diff options
author | Jeff Trawick <trawick@apache.org> | 2013-10-15 00:51:44 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2013-10-15 00:51:44 +0200 |
commit | 4073515aa50d226987f6d23710fdde9e77c65f4c (patch) | |
tree | c8c23bda7953c13aa935c5cc58b146962db13781 /server | |
parent | check that we have a pool... (diff) | |
download | apache2-4073515aa50d226987f6d23710fdde9e77c65f4c.tar.xz apache2-4073515aa50d226987f6d23710fdde9e77c65f4c.zip |
avoid needless apr_pstrdup()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1532122 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r-- | server/log.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/server/log.c b/server/log.c index 9466847d98..0ac4695cff 100644 --- a/server/log.c +++ b/server/log.c @@ -267,10 +267,8 @@ static int log_child(apr_pool_t *p, const char *progname, && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn)) == APR_SUCCESS)) { char **args; - const char *pname; apr_tokenize_to_argv(progname, &args, p); - pname = apr_pstrdup(p, args[0]); procnew = (apr_proc_t *)apr_pcalloc(p, sizeof(*procnew)); if (dummy_stderr) { @@ -278,7 +276,7 @@ static int log_child(apr_pool_t *p, const char *progname, rc = apr_procattr_child_err_set(procattr, errfile, NULL); } - rc = apr_proc_create(procnew, pname, (const char * const *)args, + rc = apr_proc_create(procnew, args[0], (const char * const *)args, NULL, procattr, p); if (rc == APR_SUCCESS) { @@ -1617,12 +1615,10 @@ static apr_status_t piped_log_spawn(piped_log *pl) } else { char **args; - const char *pname; apr_tokenize_to_argv(pl->program, &args, pl->p); - pname = apr_pstrdup(pl->p, args[0]); procnew = apr_pcalloc(pl->p, sizeof(apr_proc_t)); - status = apr_proc_create(procnew, pname, (const char * const *) args, + status = apr_proc_create(procnew, args[0], (const char * const *) args, NULL, procattr, pl->p); if (status == APR_SUCCESS) { |