tree-wide: port over more cases to STR_IN_SET()
This commit is contained in:
parent
49fe5c0996
commit
0cbd293e12
|
@ -1852,9 +1852,7 @@ char *cg_escape(const char *p) {
|
|||
* needs free()! */
|
||||
|
||||
if (IN_SET(p[0], 0, '_', '.') ||
|
||||
streq(p, "notify_on_release") ||
|
||||
streq(p, "release_agent") ||
|
||||
streq(p, "tasks") ||
|
||||
STR_IN_SET(p, "notify_on_release", "release_agent", "tasks") ||
|
||||
startswith(p, "cgroup."))
|
||||
need_prefix = true;
|
||||
else {
|
||||
|
|
|
@ -1183,8 +1183,7 @@ static bool file_has_type_prefix(const char *prefix, const char *filename) {
|
|||
tilded = strjoina(full, "~");
|
||||
atted = strjoina(prefix, "@");
|
||||
|
||||
return streq(filename, full) ||
|
||||
streq(filename, tilded) ||
|
||||
return STR_IN_SET(filename, full, tilded) ||
|
||||
startswith(filename, atted);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue