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:
Daniel Stenberg 2024-05-10 10:24:15 +02:00
parent 2036bebb07
commit cabbb9b2a5
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;