mirror of
https://github.com/curl/curl.git
synced 2026-05-22 11:46:21 +03:00
parent
d3b04e5600
commit
bcd0497c81
19 changed files with 41 additions and 80 deletions
|
|
@ -43,10 +43,8 @@
|
|||
|
||||
static ParameterError getstr(char **str, const char *val, bool allowblank)
|
||||
{
|
||||
if(*str) {
|
||||
curlx_free(*str);
|
||||
*str = NULL;
|
||||
}
|
||||
if(*str)
|
||||
curlx_safefree(*str);
|
||||
DEBUGASSERT(val);
|
||||
if(!allowblank && !val[0])
|
||||
return PARAM_BLANK_STRING;
|
||||
|
|
@ -61,10 +59,8 @@ static ParameterError getstr(char **str, const char *val, bool allowblank)
|
|||
static ParameterError getstrn(char **str, const char *val,
|
||||
size_t len, bool allowblank)
|
||||
{
|
||||
if(*str) {
|
||||
curlx_free(*str);
|
||||
*str = NULL;
|
||||
}
|
||||
if(*str)
|
||||
curlx_safefree(*str);
|
||||
DEBUGASSERT(val);
|
||||
if(!allowblank && !val[0])
|
||||
return PARAM_BLANK_STRING;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue