summaryrefslogtreecommitdiffstats
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-01-24 08:11:28 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-01-25 16:31:02 +0100
commitea1e0bf10bbfb89388a3001afa0b4c28a64bb24e (patch)
treea6a3b0b6ced70ca7773288403ccd54e4733b919b /src/core/socket.c
parentcore/unit: split out unit_kill_one() (diff)
downloadsystemd-ea1e0bf10bbfb89388a3001afa0b4c28a64bb24e.tar.xz
systemd-ea1e0bf10bbfb89388a3001afa0b4c28a64bb24e.zip
core: introduce unit_unwatch_pidref_done() helper function
No functional change, just refactoring.
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 57f6ab18db..85bd757b7d 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -108,12 +108,7 @@ static void socket_init(Unit *u) {
static void socket_unwatch_control_pid(Socket *s) {
assert(s);
-
- if (!pidref_is_set(&s->control_pid))
- return;
-
- unit_unwatch_pidref(UNIT(s), &s->control_pid);
- pidref_done(&s->control_pid);
+ unit_unwatch_pidref_done(UNIT(s), &s->control_pid);
}
static void socket_cleanup_fd_list(SocketPort *p) {