summaryrefslogtreecommitdiff
path: root/src/shared/cgroup-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 20:51:01 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 20:55:04 +0100
commitfed1e721fd0c81e60c77120539f34e16c2585634 (patch)
treea0bb21b49530bc896dcd2c540a582e324c6d7785 /src/shared/cgroup-util.c
parent36afca67b67984520c5c9a6ce14af51a68c7c8cf (diff)
treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1
Diffstat (limited to 'src/shared/cgroup-util.c')
-rw-r--r--src/shared/cgroup-util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index da8e885226..bc5030ebb2 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -682,7 +682,7 @@ int cg_set_group_access(
assert(path);
- if (mode != (mode_t) -1)
+ if (mode != MODE_INVALID)
mode &= 0777;
r = cg_get_path(controller, path, NULL, &fs);
@@ -704,10 +704,10 @@ int cg_set_task_access(
assert(path);
- if (mode == (mode_t) -1 && uid == (uid_t) -1 && gid == (gid_t) -1)
+ if (mode == MODE_INVALID && uid == UID_INVALID && gid == GID_INVALID)
return 0;
- if (mode != (mode_t) -1)
+ if (mode != MODE_INVALID)
mode &= 0666;
r = cg_get_path(controller, path, "cgroup.procs", &fs);