Merge pull request #10901 from poettering/startswith-list

add new STARTSWITH_SET() macro
This commit is contained in:
Yu Watanabe
2018-11-26 22:40:51 +09:00
committed by GitHub
22 changed files with 105 additions and 97 deletions
+1 -3
View File
@@ -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 {