]> git.ipfire.org Git - thirdparty/git.git/commit
Avoid redundant conditions
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 15 May 2025 13:11:45 +0000 (13:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 May 2025 20:46:47 +0000 (13:46 -0700)
commit3d39bcd98ecce0fce77b00fd680bd245b2161ddf
tree42d0595e15c652871e5651a6e61b7cce3754b18b
parent6c91162449cb0a2fe3c42a1caa232444afed9c7c
Avoid redundant conditions

While `if (i <= 0) ... else if (i > 0) ...` is technically equivalent to
`if (i <= 0) ... else ...`, the latter is vastly easier to read because
it avoids writing out a condition that is unnecessary. Let's drop such
unnecessary conditions.

Pointed out by CodeQL.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
help.c
transport-helper.c