Avoid using string_length()
New code should be using string_get_length() instead.
This commit is contained in:
parent
bab058ee5b
commit
f19a4af827
|
@ -116,7 +116,7 @@ int config_set(Config * config, char const * section, char const * variable,
|
|||
#endif
|
||||
if(section == NULL)
|
||||
section = "";
|
||||
if(variable == NULL || string_length(variable) == 0)
|
||||
if(variable == NULL || string_get_length(variable) == 0)
|
||||
return error_set_code(-EINVAL, "variable: %s",
|
||||
strerror(EINVAL));
|
||||
if((mutator = mutator_get(config, section)) == NULL)
|
||||
|
|
|
@ -76,7 +76,7 @@ static int _test(char const * progname, String const * filename,
|
|||
if(config_set(config, NULL, variable, "") != 0)
|
||||
ret = -error_print(progname);
|
||||
if((value = config_get(config, NULL, variable)) == NULL
|
||||
|| string_length(value) != 0)
|
||||
|| string_get_length(value) != 0)
|
||||
ret = -error_set_print(progname, 1, "%s (\"%s\")",
|
||||
"Invalid variable returned", value);
|
||||
/* config_set: restore the variable */
|
||||
|
|
Loading…
Reference in New Issue
Block a user