summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-06-23 11:46:09 +0000
committerYann Ylavic <ylavic@apache.org>2022-06-23 11:46:09 +0000
commit1fe0a645ac3ac52d51ebf494b0370d2156947354 (patch)
tree2740daf7183794a331a96fca8cda78d688580764 /threadproc
parentc78a76840870e4d6b2242a7cb87a9cf158f592be (diff)
downloadapr-1fe0a645ac3ac52d51ebf494b0370d2156947354.tar.gz
proc: Fix different 'const' qualifiers warning.
* threadproc/win32/proc.c(apr_proc_create): Don't assign const strings to "cmdline". git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902197 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/win32/proc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c
index 182243ab6..283e19afd 100644
--- a/threadproc/win32/proc.c
+++ b/threadproc/win32/proc.c
@@ -589,7 +589,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
}
/* Handle the args, separate from argv0 */
- cmdline = "";
+ cmdline = apr_pstrdup(pool, "");
for (i = 1; args && args[i]; ++i) {
if (has_space(args[i]) || !args[i][0]) {
cmdline = apr_pstrcat(pool, cmdline, " \"", args[i], "\"", NULL);
@@ -631,7 +631,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
}
/* Handle the args, seperate from argv0 */
- cmdline = "";
+ cmdline = apr_pstrdup(pool, "");
for (i = 1; args && args[i]; ++i) {
if (has_space(args[i]) || !args[i][0]) {
cmdline = apr_pstrcat(pool, cmdline, " \"", args[i], "\"", NULL);
@@ -663,7 +663,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
else {
/* A simple command we are directly invoking.
* Handle the args, seperate from argv0 */
- cmdline = argv0;
+ cmdline = apr_pstrdup(pool, argv0);
for (i = 1; args && args[i]; ++i) {
cmdline = apr_pstrcat(pool, cmdline, " ", quote_arg(args[i], pool), NULL);
}