]> git.ipfire.org Git - thirdparty/git.git/commitdiff
bisect--helper: use '-res' in 'cmd_bisect__helper' return
authorMiriam Rubio <mirucam@gmail.com>
Fri, 28 Aug 2020 12:46:06 +0000 (14:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Aug 2020 23:21:16 +0000 (16:21 -0700)
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>
builtin/bisect--helper.c

index f464e95792394a9f25ccbe7858473691c88e5b5c..b7345be3a58251bd43ba46eeb419447e78b43119 100644 (file)
@@ -731,5 +731,5 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
        if (res == BISECT_INTERNAL_SUCCESS_MERGE_BASE)
                res = BISECT_OK;
 
-       return abs(res);
+       return -res;
 }