]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
killall: fix errno check
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 25 Dec 2023 11:18:02 +0000 (12:18 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 25 Dec 2023 17:26:59 +0000 (18:26 +0100)
src/shared/killall.c

index 330b4c3272d779a7da498ed85c8a175998a712fb..917b7732665ff0635040ffd8ea230304ba9ebefa 100644 (file)
@@ -257,7 +257,7 @@ static int killall(int sig, Set *pids, bool send_sighup) {
 
                 r = pidref_kill(&pidref, sig);
                 if (r < 0) {
-                        if (errno != -ESRCH)
+                        if (r != -ESRCH)
                                 log_warning_errno(errno, "Could not kill " PID_FMT ", ignoring: %m", pidref.pid);
                 } else {
                         n_killed++;