diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-26 15:30:22 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-26 15:49:54 -0500 |
commit | f78e6385dc4cee0a1f399c4c89ebf823c108d447 (patch) | |
tree | e1baf230750ddd221b8bdd71ac4d62f5b3472968 /src/shared/cgroup-util.c | |
parent | e3e0314b56012f7febc279d268f2cadc1fcc0f25 (diff) |
Use enums to make it obvious what boolean params mean
Suggested-by: Russ Allbery <rra@debian.org>
Diffstat (limited to 'src/shared/cgroup-util.c')
-rw-r--r-- | src/shared/cgroup-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |