use SWAP macro
[gitweb.git] / graph.c
diff --git a/graph.c b/graph.c
index d4e8519c904df6e18869de527f7fe6d57adf2a26..4c722303d2d2218d26d729520cd179cb9f748674 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -997,7 +997,6 @@ static void graph_output_post_merge_line(struct git_graph *graph, struct strbuf
 static void graph_output_collapsing_line(struct git_graph *graph, struct strbuf *sb)
 {
        int i;
-       int *tmp_mapping;
        short used_horizontal = 0;
        int horizontal_edge = -1;
        int horizontal_edge_target = -1;
@@ -1132,9 +1131,7 @@ static void graph_output_collapsing_line(struct git_graph *graph, struct strbuf
        /*
         * Swap mapping and new_mapping
         */
-       tmp_mapping = graph->mapping;
-       graph->mapping = graph->new_mapping;
-       graph->new_mapping = tmp_mapping;
+       SWAP(graph->mapping, graph->new_mapping);
 
        /*
         * If graph->mapping indicates that all of the branch lines