summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-26 11:55:19 +0100
committerMike Yuan <me@yhndnzj.com>2024-03-26 11:55:19 +0100
commit469ff6b40e06b40860fa96c05a47ef08af3c97e1 (patch)
tree4858d711057739da676f38ccc4f48819ef1d49b3 /src
parentbuild(deps): bump pkg/opensuse from `af49127` to `acdb1cd` (diff)
downloadsystemd-469ff6b40e06b40860fa96c05a47ef08af3c97e1.tar.xz
systemd-469ff6b40e06b40860fa96c05a47ef08af3c97e1.zip
core/service: remove redundant Unit.type check
SOCKET(u) returns NULL if the type doesn't match.
Diffstat (limited to 'src')
-rw-r--r--src/core/service.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 953cb2934a..ba71f97474 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -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)