]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: voidify a few things
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Oct 2018 16:32:22 +0000 (18:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 13 Oct 2018 10:37:13 +0000 (12:37 +0200)
src/core/cgroup.c

index ff5f1d517157cd865326a2286eff197442e6f5a0..c89f57a67fe4612255f42e08d7d5d3eec2109876 100644 (file)
@@ -500,9 +500,9 @@ static int whitelist_major(BPFProgram *prog, const char *path, const char *name,
                         if (!prog)
                                 continue;
 
-                        cgroup_bpf_whitelist_major(prog,
-                                                   type == 'c' ? BPF_DEVCG_DEV_CHAR : BPF_DEVCG_DEV_BLOCK,
-                                                   maj, acc);
+                        (void) cgroup_bpf_whitelist_major(prog,
+                                                          type == 'c' ? BPF_DEVCG_DEV_CHAR : BPF_DEVCG_DEV_BLOCK,
+                                                          maj, acc);
                 } else {
                         char buf[2+DECIMAL_STR_MAX(unsigned)+3+4];
 
@@ -1080,10 +1080,10 @@ static void cgroup_context_apply(
                         const char *x, *y;
 
                         NULSTR_FOREACH_PAIR(x, y, auto_devices)
-                                whitelist_device(prog, path, x, y);
+                                (void) whitelist_device(prog, path, x, y);
 
                         /* PTS (/dev/pts) devices may not be duplicated, but accessed */
-                        whitelist_major(prog, path, "pts", 'c', "rw");
+                        (void) whitelist_major(prog, path, "pts", 'c', "rw");
                 }
 
                 LIST_FOREACH(device_allow, a, c->device_allow) {
@@ -1103,11 +1103,11 @@ static void cgroup_context_apply(
                         acc[k++] = 0;
 
                         if (path_startswith(a->path, "/dev/"))
-                                whitelist_device(prog, path, a->path, acc);
+                                (void) whitelist_device(prog, path, a->path, acc);
                         else if ((val = startswith(a->path, "block-")))
-                                whitelist_major(prog, path, val, 'b', acc);
+                                (void) whitelist_major(prog, path, val, 'b', acc);
                         else if ((val = startswith(a->path, "char-")))
-                                whitelist_major(prog, path, val, 'c', acc);
+                                (void) whitelist_major(prog, path, val, 'c', acc);
                         else
                                 log_unit_debug(u, "Ignoring device %s while writing cgroup attribute.", a->path);
                 }