summaryrefslogtreecommitdiff
path: root/src/tty-ask-password-agent
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-08 11:58:29 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-08 12:14:05 +0200
commit90e74a66e663f1776457d599cb7d5ce44785a56c (patch)
tree16ce28594b8dc475e37df9a3b80accb96e748efa /src/tty-ask-password-agent
parent12375b95ddcb7dbbcbc5969b87822d39115d8acf (diff)
downloadsystemd-90e74a66e663f1776457d599cb7d5ce44785a56c.tar.gz
tree-wide: define iterator inside of the macro
Diffstat (limited to 'src/tty-ask-password-agent')
-rw-r--r--src/tty-ask-password-agent/tty-ask-password-agent.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 87779a4dd6..932f6e18b2 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -583,7 +583,6 @@ static void terminate_agents(Set *pids) {
struct timespec ts;
siginfo_t status = {};
sigset_t set;
- Iterator i;
void *p;
int r, signum;
@@ -591,7 +590,7 @@ static void terminate_agents(Set *pids) {
* Request termination of the remaining processes as those
* are not required anymore.
*/
- SET_FOREACH(p, pids, i)
+ SET_FOREACH(p, pids)
(void) kill(PTR_TO_PID(p), SIGTERM);
/*
@@ -625,7 +624,7 @@ static void terminate_agents(Set *pids) {
/*
* Kill hanging processes.
*/
- SET_FOREACH(p, pids, i) {
+ SET_FOREACH(p, pids) {
log_warning("Failed to terminate child %d, killing it", PTR_TO_PID(p));
(void) kill(PTR_TO_PID(p), SIGKILL);
}