core/service: remove redundant Unit.type check

SOCKET(u) returns NULL if the type doesn't match.
This commit is contained in:
Mike Yuan
2024-03-26 18:55:19 +08:00
parent 0d9e4b7aa4
commit 469ff6b40e
+2 -3
View File
@@ -1409,10 +1409,9 @@ static int service_collect_fds(
Socket *sock;
int cn_fds;
if (u->type != UNIT_SOCKET)
continue;
sock = SOCKET(u);
if (!sock)
continue;
cn_fds = socket_collect_fds(sock, &cfds);
if (cn_fds < 0)