nfqws,tpws: remove unneeded code

This commit is contained in:
bol-van
2024-10-31 19:59:26 +03:00
parent 228572afb5
commit 8b4b8c3fb0
8 changed files with 13 additions and 118 deletions

View File

@@ -217,9 +217,7 @@ static void exithelp(void)
}
static void cleanup_args()
{
free_command_line(params.argv,params.argc);
params.argv = NULL;
params.argc = 0;
wordfree(&params.wexp);
}
static void cleanup_params(void)
{
@@ -423,14 +421,13 @@ void parse_params(int argc, char *argv[])
replace_char(buf,'\n',' ');
replace_char(buf,'\r',' ');
replace_char(buf,'\t',' ');
params.argv = split_command_line(buf,&params.argc);
if (!params.argv)
if (wordexp(buf, &params.wexp, WRDE_NOCMD))
{
DLOG_ERR("failed to split command line options from file '%s'\n",argv[1]+1);
exit_clean(1);
}
argv=params.argv;
argc=params.argc;
argv=params.wexp.we_wordv;
argc=params.wexp.we_wordc;
}
const struct option long_options[] = {