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:
Lennart Poettering
2017-11-29 12:41:08 +01:00
parent 5716965132
commit 7b943bb7e3
5 changed files with 25 additions and 10 deletions
+1 -1
View File
@@ -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);