cgroup-util: move Set* allocation into cg_kernel_controllers()

Previously, callers had to do this on their own. Let's make the call do
that instead, making the caller code a bit shorter.
This commit is contained in:
Lennart Poettering
2017-11-21 11:54:08 +01:00
parent bf516294c8
commit 6925a0de4e
4 changed files with 17 additions and 14 deletions
+1 -5
View File
@@ -1111,11 +1111,7 @@ static int mount_legacy_cgns_unsupported(
if (r > 0)
goto skip_controllers;
controllers = set_new(&string_hash_ops);
if (!controllers)
return log_oom();
r = cg_kernel_controllers(controllers);
r = cg_kernel_controllers(&controllers);
if (r < 0)
return log_error_errno(r, "Failed to determine cgroup controllers: %m");