diff options
author | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 22:32:45 -0800 |
---|---|---|
committer | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 22:32:45 -0800 |
commit | 9b133a978d5f33985a9b66d3a75165e3d50cdfa3 (patch) | |
tree | e846e195756904d8c007ae1f33e77a53d696102c /exec.cpp | |
parent | 203c749e6cc2d5ac0e9e8e240c77d94e179c60d0 (diff) |
Improve const and signed/unsigned correctness
Diffstat (limited to 'exec.cpp')
-rw-r--r-- | exec.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -543,8 +543,9 @@ static void launch_process( process_t *p ) count++; res = (wchar_t **)malloc( sizeof(wchar_t*)*(count+2)); - - res[0] = L"/bin/sh"; + wchar_t sh_command[] = L"/bin/sh"; + + res[0] = sh_command; res[1] = p->actual_cmd; for( i=1; p->argv[i]; i++ ){ @@ -553,7 +554,7 @@ static void launch_process( process_t *p ) res[i+1] = 0; p->argv = res; - p->actual_cmd = L"/bin/sh"; + p->actual_cmd = sh_command; res_real = wcsv2strv( (const wchar_t **) res); |