]> git.ipfire.org Git - thirdparty/git.git/commit
diffcore-break: use a goto instead of a redundant if statement
authorAlex Henrie <alexhenrie24@gmail.com>
Tue, 1 Oct 2019 02:29:35 +0000 (20:29 -0600)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Oct 2019 06:04:21 +0000 (15:04 +0900)
commitbaed6bbb5b56a501d1137e53caba614f77c3435d
treefd27f129a90d4221fd8f36ca5d8883db43ebc54d
parent8da02ce62a4e76aea7a02d56b66b10eedc8e6db8
diffcore-break: use a goto instead of a redundant if statement

The condition "if (q->nr <= j)" checks whether the loop exited normally
or via a break statement. Avoid this check by replacing the jump out of
the inner loop with a jump to the end of the outer loop, which makes it
obvious that diff_q is not executed when the peer survives.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diffcore-break.c