Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2009-07-23 01:34:35 +0400
committerJunio C Hamano <gitster@pobox.com>2009-07-23 08:57:41 +0400
commit98cb6f30f708ef416572bf65bd26ac9f998ae0dc (patch)
treebed685d6c61a21dd9884a97606df16f1697408d0 /preload-index.c
parentf630cfda8800aee03c7eb2fcd0f840730fbe43b9 (diff)
janitor: add DIV_ROUND_UP and use it.
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'preload-index.c')
-rw-r--r--preload-index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/preload-index.c b/preload-index.c
index 14d5281183..92899333c2 100644
--- a/preload-index.c
+++ b/preload-index.c
@@ -76,7 +76,7 @@ static void preload_index(struct index_state *index, const char **pathspec)
if (threads > MAX_PARALLEL)
threads = MAX_PARALLEL;
offset = 0;
- work = (index->cache_nr + threads - 1) / threads;
+ work = DIV_ROUND_UP(index->cache_nr, threads);
for (i = 0; i < threads; i++) {
struct thread_data *p = data+i;
p->index = index;