Pavel Raiskup ha escrit:
> Do not call wordsplit on multiple places when not necessary.
>
> (run_decompress_program): Do not call wordsplit - rather reuse xexec.
That's wrong. The intent of the function is to try all matching
decompressors and find the one which works. Xexec cannot be used her
Do not call wordsplit on multiple places when not necessary.
Move the xexec function into #ifndef MSDOS part of file.
* system.c (try_exec): New function - modified previous xexec.
(xexec): Re-use try_exec and fail when not try_exec unsuccessful.
(run_decompress_program): Do not call wordsplit - r
On Wed, 2013-02-20 at 16:28 +0300, Sergey Poznyakoff wrote:
> Pavel Raiskup ha escrit:
>
> > Move the xexec function into #ifndef MSDOS part of file.
>
> Yes, that's reasonable.
>
> > * system.c (try_exec): New function - modified previous xexec.
>
> This will cause a memory leak and imply unn
Pavel Raiskup ha escrit:
> Move the xexec function into #ifndef MSDOS part of file.
Yes, that's reasonable.
> * system.c (try_exec): New function - modified previous xexec.
This will cause a memory leak and imply unnecessary memory
reallocations.
What happens here is:
487 if (wordsplit
Do not call wordsplit on multiple places when not necessary.
* system.c (sys_child_open_for_compress): Trim line.
(run_decompress_program): Do not call wordsplit - rather reuse xexec.
(sys_exec_command): Remove unused variable argv.
---
src/system.c | 40 +---