[PATCH v4 02/13] bisect--helper: use '-res' in 'cmd_bisect__helper' return
- From
Miriam Rubio <mirucam@gmail.com>
- Date
- Jul 1, 2020, 13:34 UTC
- Message-ID
- <20200701133504.18360-3-mirucam@gmail.com>
- In-Reply-To
- <20200701133504.18360-1-mirucam@gmail.com>
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> Signed-off-by: Miriam Rubio <mirucam@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> --- builtin/bisect--helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index c452d3f6b7..0466b07a43 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -727,5 +727,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; }
-- 2.25.0