]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/killall.c
tree-wide: define iterator inside of the macro
[thirdparty/systemd.git] / src / core / killall.c
index 075c705ca7396d6bade7043d819a40d6b42ff13e..0272fdb0da5def7c35c003f357dad2748072d6e3 100644 (file)
@@ -79,10 +79,9 @@ static bool ignore_proc(pid_t pid, bool warn_rootfs) {
 
 static void log_children_no_yet_killed(Set *pids) {
         _cleanup_free_ char *lst_child = NULL;
-        Iterator i;
         void *p;
 
-        SET_FOREACH(p, pids, i) {
+        SET_FOREACH(p, pids) {
                 _cleanup_free_ char *s = NULL;
 
                 if (get_process_comm(PTR_TO_PID(p), &s) < 0)
@@ -121,7 +120,6 @@ static int wait_for_children(Set *pids, sigset_t *mask, usec_t timeout) {
                 struct timespec ts;
                 int k;
                 void *p;
-                Iterator i;
 
                 /* First, let the kernel inform us about killed
                  * children. Most processes will probably be our
@@ -145,7 +143,7 @@ static int wait_for_children(Set *pids, sigset_t *mask, usec_t timeout) {
 
                 /* Now explicitly check who might be remaining, who
                  * might not be our child. */
-                SET_FOREACH(p, pids, i) {
+                SET_FOREACH(p, pids) {
 
                         /* kill(pid, 0) sends no signal, but it tells
                          * us whether the process still exists. */