@matheusbsbs / matheus-bagliano / commits / 30276765c1
Fork 0

bisect--helper: use '-res' in 'cmd_bisect__helper' return

Following 'enum bisect_error' vocabulary, return variable 'res' is always non-positive. Let's use '-res' instead of 'abs(res)' to make the code clearer. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Miriam Rubio <mirucam@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Miriam Rubio committed Aug 28, 2020 at 14:46 UTC 30276765c114bbd57ef0d8e6cf5489501599421a
1 file changed +1 -1
builtin/bisect--helper.c
+1 -1
@@ -731,5 +731,5 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
731 if (res == BISECT_INTERNAL_SUCCESS_MERGE_BASE)
732 res = BISECT_OK;
733
734 - return abs(res);
734 + return -res;
735 }