[systemd-devel] [PATCH] bus: use STR_IN_SET

WaLyong Cho walyong.cho at samsung.com
Wed Oct 29 23:45:15 PDT 2014


---
 src/core/dbus-unit.c | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index 9b13c6e..2d1862c 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -859,20 +859,16 @@ static int bus_unit_set_transient_property(
                 }
 
                 return 1;
-
-        } else if (streq(name, "Requires") ||
-                   streq(name, "RequiresOverridable") ||
-                   streq(name, "Requisite") ||
-                   streq(name, "RequisiteOverridable") ||
-                   streq(name, "Wants") ||
-                   streq(name, "BindsTo") ||
-                   streq(name, "Conflicts") ||
-                   streq(name, "Before") ||
-                   streq(name, "After") ||
-                   streq(name, "OnFailure") ||
-                   streq(name, "PropagatesReloadTo") ||
-                   streq(name, "ReloadPropagatedFrom") ||
-                   streq(name, "PartOf")) {
+        } else if (STR_IN_SET(name,
+                              "Requires", "RequiresOverridable",
+                              "Requisite", "RequisiteOverridable",
+                              "Wants",
+                              "BindsTo",
+                              "Conflicts",
+                              "Before", "After",
+                              "OnFailure",
+                              "PropagatesReloadTo", "ReloadPropagatedFrom",
+                              "PartOf")) {
 
                 UnitDependency d;
                 const char *other;
-- 
1.9.3



More information about the systemd-devel mailing list