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:
+2
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user