]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/cgroup: use > 0 comparison rather than == 1
authorMike Yuan <me@yhndnzj.com>
Sat, 1 Jun 2024 22:37:08 +0000 (06:37 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 28 Jun 2024 13:38:41 +0000 (15:38 +0200)
src/core/cgroup.c

index 19028b810bacfc7ae37b4a76e1a8c2897344f5dc..bb78ded3eb29936ae57c22727d58c16aabfa8baf 100644 (file)
@@ -3549,7 +3549,7 @@ bool unit_maybe_release_cgroup(Unit *u) {
          * failed) we need the cgroup paths to continue to be tracked by the manager so they can be looked up
          * and cleaned up later. */
         r = unit_cgroup_is_empty(u);
-        if (r == 1) {
+        if (r > 0) {
                 unit_release_cgroup(u);
                 return true;
         }