Commit 48595de13ae9d5618864199e01c22c837101f905

Stefan Sperling 2020-01-04T23:58:45

remove redundant code from add_node_to_iter_list()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/lib/commit_graph.c b/lib/commit_graph.c
index 67cc1c5..c908949 100644
--- a/lib/commit_graph.c
+++ b/lib/commit_graph.c
@@ -151,11 +151,6 @@ add_node_to_iter_list(struct got_commit_graph *graph,
 {
 	struct got_commit_graph_node *n, *next;
 
-	if (TAILQ_EMPTY(&graph->iter_list)) {
-		TAILQ_INSERT_HEAD(&graph->iter_list, node, entry);
-		return;
-	}
-
 	n = TAILQ_FIRST(&graph->iter_list);
 	/* Ensure that an iteration in progress will see this new commit. */
 	while (n) {