Commit 956a5d5aff9cdfd39a8ceff4ed60ddb4c5d50ec9

Stefan Sperling 2018-06-04T20:33:41

replace unnecessary use of FOREACH_SAFE with FOREACH

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/lib/object_idset.c b/lib/object_idset.c
index 58f89bf..4883efe 100644
--- a/lib/object_idset.c
+++ b/lib/object_idset.c
@@ -180,12 +180,11 @@ got_object_idset_contains(struct got_object_idset *set,
 void got_object_idset_for_each(struct got_object_idset *set,
     void (*cb)(struct got_object_id *, void *))
 {
-	struct got_object_idset_element *entry, *tmp;
+	struct got_object_idset_element *entry;
 	int i;
 
 	for (i = 0; i < nitems(set->entries); i++) {
-		TAILQ_FOREACH_SAFE(entry, &set->entries[i], entry, tmp) {
+		TAILQ_FOREACH(entry, &set->entries[i], entry)
 			cb(&entry->id, entry->data);
-		}
 	}
 }