mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:43:32 +03:00
parse_args: redo the warnings for --remote-header-name combos
... to avoid the memory leak risk pointed out by scan-build.
Follow-up from 7a3e981781
Closes #7698
This commit is contained in:
parent
4fb5a643c8
commit
2b99f5e02c
3 changed files with 13 additions and 13 deletions
|
|
@ -2384,17 +2384,11 @@ ParameterError parse_args(struct GlobalConfig *global, int argc,
|
|||
curlx_unicodefree(orig_opt);
|
||||
}
|
||||
|
||||
if(config->content_disposition) {
|
||||
if(config->show_headers) {
|
||||
helpf(global->errors, "--include and --remote-header-name "
|
||||
"cannot be combined.\n");
|
||||
return PARAM_BAD_USE;
|
||||
}
|
||||
if(config->resume_from_current) {
|
||||
helpf(global->errors, "--continue-at - and --remote-header-name "
|
||||
"cannot be combined.\n");
|
||||
return PARAM_BAD_USE;
|
||||
}
|
||||
if(!result && config->content_disposition) {
|
||||
if(config->show_headers)
|
||||
result = PARAM_CONTDISP_SHOW_HEADER;
|
||||
else if(config->resume_from_current)
|
||||
result = PARAM_CONTDISP_RESUME_FROM;
|
||||
}
|
||||
|
||||
if(result && result != PARAM_HELP_REQUESTED &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue