Merge tag 'v2.13.5' into maint
[gitweb.git] / builtin / receive-pack.c
index 71c0c768db92378b824951acd6efb7179438017b..cabdc55e0933adb09d459a5a0747c718fd2c7d1e 100644 (file)
@@ -1806,7 +1806,7 @@ static const char *unpack_with_sideband(struct shallow_info *si)
 static void prepare_shallow_update(struct command *commands,
                                   struct shallow_info *si)
 {
-       int i, j, k, bitmap_size = (si->ref->nr + 31) / 32;
+       int i, j, k, bitmap_size = DIV_ROUND_UP(si->ref->nr, 32);
 
        ALLOC_ARRAY(si->used_shallow, si->shallow->nr);
        assign_shallow_commits_to_refs(si, si->used_shallow, NULL);