From: Lennart Poettering Date: Wed, 18 Oct 2023 12:38:07 +0000 (+0200) Subject: pidref: make signal sending calls take const PidRef X-Git-Tag: v255-rc1~209^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44c55e5a3f3bc5a91279e48f521447e4ee368eff;p=thirdparty%2Fsystemd.git pidref: make signal sending calls take const PidRef --- 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);