From 44c55e5a3f3bc5a91279e48f521447e4ee368eff Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 18 Oct 2023 14:38:07 +0200 Subject: [PATCH] pidref: make signal sending calls take const PidRef --- src/basic/pidref.c | 6 +++--- src/basic/pidref.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/basic/pidref.c b/src/basic/pidref.c index e662f62af6d..db58a3d809d 100644 --- a/src/basic/pidref.c +++ b/src/basic/pidref.c @@ -186,7 +186,7 @@ int pidref_new_from_pid(pid_t pid, PidRef **ret) { return 0; } -int pidref_kill(PidRef *pidref, int sig) { +int pidref_kill(const PidRef *pidref, int sig) { if (!pidref) return -ESRCH; @@ -200,7 +200,7 @@ int pidref_kill(PidRef *pidref, int sig) { return -ESRCH; } -int pidref_kill_and_sigcont(PidRef *pidref, int sig) { +int pidref_kill_and_sigcont(const PidRef *pidref, int sig) { int r; r = pidref_kill(pidref, sig); @@ -213,7 +213,7 @@ int pidref_kill_and_sigcont(PidRef *pidref, int sig) { return 0; } -int pidref_sigqueue(PidRef *pidref, int sig, int value) { +int pidref_sigqueue(const PidRef *pidref, int sig, int value) { if (!pidref) return -ESRCH; diff --git a/src/basic/pidref.h b/src/basic/pidref.h index e1fdac27005..61d091a3444 100644 --- a/src/basic/pidref.h +++ b/src/basic/pidref.h @@ -51,9 +51,9 @@ int pidref_dup(const PidRef *pidref, PidRef **ret); int pidref_new_from_pid(pid_t pid, PidRef **ret); -int pidref_kill(PidRef *pidref, int sig); -int pidref_kill_and_sigcont(PidRef *pidref, int sig); -int pidref_sigqueue(PidRef *pidfref, int sig, int value); +int pidref_kill(const PidRef *pidref, int sig); +int pidref_kill_and_sigcont(const PidRef *pidref, int sig); +int pidref_sigqueue(const PidRef *pidfref, int sig, int value); int pidref_verify(const PidRef *pidref); -- 2.47.3