confile_utils: cleanup set_config_string_item_max()

parent 01dbd528
...@@ -627,10 +627,8 @@ int set_config_string_item(char **conf_item, const char *value) ...@@ -627,10 +627,8 @@ int set_config_string_item(char **conf_item, const char *value)
int set_config_string_item_max(char **conf_item, const char *value, size_t max) int set_config_string_item_max(char **conf_item, const char *value, size_t max)
{ {
if (strlen(value) >= max) { if (strlen(value) >= max)
ERROR("%s is too long (>= %lu)", value, (unsigned long)max); return log_error_errno(-ENAMETOOLONG, ENAMETOOLONG, "%s is too long (>= %lu)", value, (unsigned long)max);
return -1;
}
return set_config_string_item(conf_item, value); return set_config_string_item(conf_item, value);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment