From ecd677bcc9c9487ff2cefe64c6dff45e26041833 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Wed, 24 Dec 2025 19:22:07 +0100 Subject: [PATCH] core/cgroup: no need to handle empty bind_network_interface We always normalize empty setting to NULL, hence per our usual coding style a simply NULL check would suffice. --- src/core/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/cgroup.c b/src/core/cgroup.c index a9dde6ce9d2..89257724379 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -571,7 +571,7 @@ void cgroup_context_dump(Unit *u, FILE* f, const char *prefix) { fprintf(f, "%sDelegateSubgroup: %s\n", prefix, c->delegate_subgroup); - if (!isempty(c->bind_network_interface)) + if (c->bind_network_interface) fprintf(f, "%sBindNetworkInterface: %s\n", prefix, c->bind_network_interface); @@ -1698,7 +1698,7 @@ static bool unit_get_needs_bind_network_interface(Unit *u) { if (!c) return false; - return !isempty(c->bind_network_interface); + return c->bind_network_interface; } static CGroupMask unit_get_cgroup_mask(Unit *u) { -- 2.47.3