You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2013/10/15 00:51:45 UTC
svn commit: r1532122 - /httpd/httpd/trunk/server/log.c
Author: trawick
Date: Mon Oct 14 22:51:44 2013
New Revision: 1532122
URL: http://svn.apache.org/r1532122
Log:
avoid needless apr_pstrdup()
Modified:
httpd/httpd/trunk/server/log.c
Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=1532122&r1=1532121&r2=1532122&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Mon Oct 14 22:51:44 2013
@@ -267,10 +267,8 @@ static int log_child(apr_pool_t *p, cons
&& ((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, cons
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(pipe
}
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) {