pid1: rename unit_check_gc to unit_may_gc
"check" is unclear: what is true, what is false? Let's rename to "can_gc" and
revert the return value ("positive" values are easier to grok).
v2:
- rename from unit_can_gc to unit_may_gc
This commit is contained in:
+3
-3
@@ -2819,12 +2819,12 @@ SocketType socket_port_type_from_string(const char *s) {
|
||||
return _SOCKET_TYPE_INVALID;
|
||||
}
|
||||
|
||||
_pure_ static bool socket_check_gc(Unit *u) {
|
||||
_pure_ static bool socket_may_gc(Unit *u) {
|
||||
Socket *s = SOCKET(u);
|
||||
|
||||
assert(u);
|
||||
|
||||
return s->n_connections > 0;
|
||||
return s->n_connections == 0;
|
||||
}
|
||||
|
||||
static int socket_accept_do(Socket *s, int fd) {
|
||||
@@ -3324,7 +3324,7 @@ const UnitVTable socket_vtable = {
|
||||
.active_state = socket_active_state,
|
||||
.sub_state_to_string = socket_sub_state_to_string,
|
||||
|
||||
.check_gc = socket_check_gc,
|
||||
.may_gc = socket_may_gc,
|
||||
|
||||
.sigchld_event = socket_sigchld_event,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user