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.
This commit is contained in:
Mike Yuan
2025-12-27 23:47:55 +01:00
parent 705d2c527f
commit ecd677bcc9
+2 -2
View File
@@ -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) {