diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-08-08 14:48:41 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-08-08 14:48:41 -0700 |
| commit | 68e80da479ff940aea3f34447336e523b448f34c (patch) | |
| tree | 077a06f3e0602a16a0cf39b1636566809747fe3d /diffcore-rename.c | |
| parent | Merge branch 'ib/t3700-add-chmod-x-updates' (diff) | |
| parent | pass constants as first argument to st_mult() (diff) | |
| download | git-68e80da479ff940aea3f34447336e523b448f34c.tar.gz git-68e80da479ff940aea3f34447336e523b448f34c.zip | |
Merge branch 'rs/st-mult'
Micro optimization of st_mult() facility used to check the integer
overflow coming from multiplication to compute size of memory
allocation.
* rs/st-mult:
pass constants as first argument to st_mult()
Diffstat (limited to 'diffcore-rename.c')
| -rw-r--r-- | diffcore-rename.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c index 58ac0a531b..73d003a08a 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -541,7 +541,7 @@ void diffcore_rename(struct diff_options *options) rename_dst_nr * rename_src_nr, 50, 1); } - mx = xcalloc(st_mult(num_create, NUM_CANDIDATE_PER_DST), sizeof(*mx)); + mx = xcalloc(st_mult(NUM_CANDIDATE_PER_DST, num_create), sizeof(*mx)); for (dst_cnt = i = 0; i < rename_dst_nr; i++) { struct diff_filespec *two = rename_dst[i].two; struct diff_score *m; |
