]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/rfkill/rfkill.c
list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() safer
[thirdparty/systemd.git] / src / rfkill / rfkill.c
index 7e8b8a27ef33a6308ddad64c0692dec56ce41963..656afa06ac8b4b551dba25271bc104b89cca6933 100644 (file)
@@ -190,7 +190,7 @@ static int load_state(Context *c, const struct rfkill_event *event) {
 static void save_state_queue_remove(Context *c, int idx, const char *state_file) {
         assert(c);
 
-        LIST_FOREACH_SAFE(queue, item, tmp, c->write_queue)
+        LIST_FOREACH(queue, item, c->write_queue)
                 if ((state_file && streq(item->file, state_file)) || idx == item->rfkill_idx) {
                         log_debug("Canceled previous save state of '%s' to %s.", one_zero(item->state), item->file);
                         LIST_REMOVE(queue, c->write_queue, item);