]> git.ipfire.org Git - thirdparty/git.git/commit - graph.c
graph: use SWAP macro
authorRené Scharfe <l.s.r@web.de>
Sat, 28 Jan 2017 21:42:15 +0000 (22:42 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Jan 2017 22:23:12 +0000 (14:23 -0800)
commit9e2edd66dda418dad751d5eb2e5921e05e57cd30
tree4c81efb368f0fa60a228f64300901cf1ca67e82c
parent402bf8e19832142de97d84d37c51262d91e5f2db
graph: use SWAP macro

Exchange the values of graph->columns and graph->new_columns using the
macro SWAP instead of hand-rolled code.  The result is shorter and
easier to read.

This transformation was not done by the semantic patch swap.cocci
because there's an unrelated statement between the second and the last
step of the exchange, so it didn't match the expected pattern.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
graph.c