mirror of
https://github.com/curl/curl.git
synced 2026-04-18 16:11:42 +03:00
tool_getparam: remove two redundant conditions
When getstr() does not return error, it returns a valid pointer. Spotted by CodeSonar Closes #13576
This commit is contained in:
parent
2036bebb07
commit
cabbb9b2a5
1 changed files with 2 additions and 4 deletions
|
|
@ -894,8 +894,7 @@ static ParameterError data_urlencode(struct GlobalConfig *global,
|
|||
err = getstr(&postdata, p, ALLOW_BLANK);
|
||||
if(err)
|
||||
goto error;
|
||||
if(postdata)
|
||||
size = strlen(postdata);
|
||||
size = strlen(postdata);
|
||||
}
|
||||
|
||||
if(!postdata) {
|
||||
|
|
@ -1124,8 +1123,7 @@ static ParameterError set_data(cmdline_t cmd,
|
|||
err = getstr(&postdata, nextarg, ALLOW_BLANK);
|
||||
if(err)
|
||||
return err;
|
||||
if(postdata)
|
||||
size = strlen(postdata);
|
||||
size = strlen(postdata);
|
||||
}
|
||||
if(cmd == C_JSON)
|
||||
config->jsoned = TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue