diff options
author | René Scharfe <l.s.r@web.de> | 2017-07-08 13:35:35 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-11 00:24:36 +0300 |
commit | 42c78a216e751cfa2720c8276c9e9f2b81640e6b (patch) | |
tree | ff12c046af74e524d80ec247f8039592337afee6 /builtin/gc.c | |
parent | 8c8e978f5719c6a58fb998742207bf907f963143 (diff) |
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/gc.c')
-rw-r--r-- | builtin/gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index 91f7696a85..0477c2451f 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -148,7 +148,7 @@ static int too_many_loose_objects(void) if (!dir) return 0; - auto_threshold = (gc_auto_threshold + 255) / 256; + auto_threshold = DIV_ROUND_UP(gc_auto_threshold, 256); while ((ent = readdir(dir)) != NULL) { if (strspn(ent->d_name, "0123456789abcdef") != 38 || ent->d_name[38] != '\0') |