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>
This commit is contained in:

committed by
Junio C Hamano

parent
8c8e978f57
commit
42c78a216e
@ -524,7 +524,7 @@ static void compile_submodule_options(const struct grep_opt *opt,
|
||||
* submodule process has its own thread pool.
|
||||
*/
|
||||
argv_array_pushf(&submodule_options, "--threads=%d",
|
||||
(num_threads + 1) / 2);
|
||||
DIV_ROUND_UP(num_threads, 2));
|
||||
|
||||
/* Add Pathspecs */
|
||||
argv_array_push(&submodule_options, "--");
|
||||
|
Reference in New Issue
Block a user