diff options
author | René Scharfe <l.s.r@web.de> | 2017-07-08 12:35:35 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-10 14:24:36 -0700 |
commit | 42c78a216e751cfa2720c8276c9e9f2b81640e6b (patch) | |
tree | ff12c046af74e524d80ec247f8039592337afee6 /builtin/log.c | |
parent | Git 2.13.2 (diff) | |
download | tgif-42c78a216e751cfa2720c8276c9e9f2b81640e6b.tar.xz |
use DIV_ROUND_UP
Convert code that divides and rounds up to use DIV_ROUND_UP to make the
intent clearer and reduce the number of magic constants.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c index 57ce470f50..96c050b450 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1302,7 +1302,7 @@ static struct commit *get_base_commit(const char *base_commit, if (rev_nr % 2) rev[i] = rev[2 * i]; - rev_nr = (rev_nr + 1) / 2; + rev_nr = DIV_ROUND_UP(rev_nr, 2); } if (!in_merge_bases(base, rev[0])) |