tree-wide: use strv_isempty() instead of strv_length() == 0
It's a lot faster in many cases, since it's O(1) rather than O(n).
This commit is contained in:
@@ -1788,7 +1788,7 @@ static bool should_include_path(const char *path) {
|
||||
|
||||
/* no matches, so we should include this path only if we
|
||||
* have no whitelist at all */
|
||||
if (strv_length(arg_include_prefixes) == 0)
|
||||
if (strv_isempty(arg_include_prefixes))
|
||||
return true;
|
||||
|
||||
log_debug("Entry \"%s\" does not match any include prefix, skipping.", path);
|
||||
|
||||
Reference in New Issue
Block a user