diff options
author | Yann Ylavic <ylavic@apache.org> | 2022-06-23 11:46:09 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2022-06-23 11:46:09 +0000 |
commit | 1fe0a645ac3ac52d51ebf494b0370d2156947354 (patch) | |
tree | 2740daf7183794a331a96fca8cda78d688580764 /threadproc | |
parent | c78a76840870e4d6b2242a7cb87a9cf158f592be (diff) | |
download | apr-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.c | 6 |
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); } |