2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 12:19:39 +00:00

cgroups: use semantically clean check in cpuset1_cpus_initialize()

The variable is a pointer not a integer.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner
2021-08-16 10:56:51 +02:00
parent 7b8746b976
commit 23ef48f0d8

View File

@@ -602,7 +602,7 @@ static bool cpuset1_cpus_initialize(int dfd_parent, int dfd_child,
return log_error_errno(false, errno, "Failed to create cpumask for isolated cpus");
}
if (offlinecpus > 0) {
if (offlinecpus) {
ret = lxc_cpumask(offlinecpus, &offlinemask, &offline_last_set_bit);
if (ret)
return log_error_errno(false, errno, "Failed to create cpumask for offline cpus");