Avoid using string_length()

New code should be using string_get_length() instead.
This commit is contained in:
Pierre Pronchery 2015-06-22 18:41:23 -04:00
parent bab058ee5b
commit f19a4af827
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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 */