From f78e6385dc4cee0a1f399c4c89ebf823c108d447 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 26 Dec 2013 15:30:22 -0500 Subject: Use enums to make it obvious what boolean params mean Suggested-by: Russ Allbery --- src/shared/cgroup-util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/cgroup-util.c') diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c index 27eee8eacd..f2af8dcfda 100644 --- a/src/shared/cgroup-util.c +++ b/src/shared/cgroup-util.c @@ -1152,7 +1152,7 @@ int cg_path_decode_unit(const char *cgroup, char **unit){ c = strndupa(cgroup, e - cgroup); c = cg_unescape(c); - if (!unit_name_is_valid(c, false)) + if (!unit_name_is_valid(c, TEMPLATE_INVALID)) return -EINVAL; s = strdup(c); @@ -1566,7 +1566,7 @@ int cg_slice_to_path(const char *unit, char **ret) { assert(unit); assert(ret); - if (!unit_name_is_valid(unit, false)) + if (!unit_name_is_valid(unit, TEMPLATE_INVALID)) return -EINVAL; if (!endswith(unit, ".slice")) @@ -1583,7 +1583,7 @@ int cg_slice_to_path(const char *unit, char **ret) { strcpy(stpncpy(n, p, dash - p), ".slice"); - if (!unit_name_is_valid(n, false)) + if (!unit_name_is_valid(n, TEMPLATE_INVALID)) return -EINVAL; escaped = cg_escape(n); -- cgit v1.2.3-54-g00ecf