File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -2313,11 +2313,9 @@ static void prepare_shallow_update(struct shallow_info *si)
23132313 ALLOC_ARRAY (si -> used_shallow , si -> shallow -> nr );
23142314 assign_shallow_commits_to_refs (si , si -> used_shallow , NULL );
23152315
2316- si -> need_reachability_test =
2317- xcalloc (si -> shallow -> nr , sizeof (* si -> need_reachability_test ));
2318- si -> reachable =
2319- xcalloc (si -> shallow -> nr , sizeof (* si -> reachable ));
2320- si -> shallow_ref = xcalloc (si -> ref -> nr , sizeof (* si -> shallow_ref ));
2316+ CALLOC_ARRAY (si -> need_reachability_test , si -> shallow -> nr );
2317+ CALLOC_ARRAY (si -> reachable , si -> shallow -> nr );
2318+ CALLOC_ARRAY (si -> shallow_ref , si -> ref -> nr );
23212319
23222320 for (i = 0 ; i < si -> nr_ours ; i ++ )
23232321 si -> need_reachability_test [si -> ours [i ]] = 1 ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ int cmd__bloom(int argc, const char **argv)
6969 struct bloom_filter filter ;
7070 int i = 2 ;
7171 filter .len = (settings .bits_per_entry + BITS_PER_WORD - 1 ) / BITS_PER_WORD ;
72- filter .data = xcalloc ( filter .len , sizeof ( unsigned char ) );
72+ CALLOC_ARRAY ( filter .data , filter .len );
7373
7474 if (argc - 1 < i )
7575 usage (bloom_usage );
You can’t perform that action at this time.
0 commit comments