fundamental: rework IN_SET() to require at least three arguments

If less than three parameters are passed a simple comparison is the
better choice.

Lo and behold this found two pretty bad typos.
This commit is contained in:
Lennart Poettering
2023-01-02 17:16:50 +01:00
parent efa75d7022
commit 4f06325ce9
9 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ static int populate_uid_cache(const char *root, Hashmap **ret) {
return -ENOMEM;
r = hashmap_put(cache, n, UID_TO_PTR(pw->pw_uid));
if (IN_SET(r, 0 -EEXIST))
if (IN_SET(r, 0, -EEXIST))
continue;
if (r < 0)
return r;