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 @@ -1837,11 +1837,9 @@ static void prepare_shallow_update(struct shallow_info *si)
18371837 ALLOC_ARRAY (si -> used_shallow , si -> shallow -> nr );
18381838 assign_shallow_commits_to_refs (si , si -> used_shallow , NULL );
18391839
1840- si -> need_reachability_test =
1841- xcalloc (si -> shallow -> nr , sizeof (* si -> need_reachability_test ));
1842- si -> reachable =
1843- xcalloc (si -> shallow -> nr , sizeof (* si -> reachable ));
1844- si -> shallow_ref = xcalloc (si -> ref -> nr , sizeof (* si -> shallow_ref ));
1840+ CALLOC_ARRAY (si -> need_reachability_test , si -> shallow -> nr );
1841+ CALLOC_ARRAY (si -> reachable , si -> shallow -> nr );
1842+ CALLOC_ARRAY (si -> shallow_ref , si -> ref -> nr );
18451843
18461844 for (i = 0 ; i < si -> nr_ours ; i ++ )
18471845 si -> need_reachability_test [si -> ours [i ]] = 1 ;
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ int cmd__bloom(int argc, const char **argv)
6565 struct bloom_filter filter ;
6666 int i = 2 ;
6767 filter .len = (settings .bits_per_entry + BITS_PER_WORD - 1 ) / BITS_PER_WORD ;
68- filter .data = xcalloc ( filter .len , sizeof ( unsigned char ) );
68+ CALLOC_ARRAY ( filter .data , filter .len );
6969
7070 if (argc - 1 < i )
7171 usage (bloom_usage );
You can’t perform that action at this time.
0 commit comments