1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-19 17:36:08 +02:00

xdiff: drop unused mmfile parameters from xdl_do_histogram_diff()

These are no longer used since 9df0fc3d57 (xdiff: fix a memory leak,
2022-02-16), as the caller is expected to call xdl_prepare_env() itself.
After that change the histogram code only examines the prepared
xdfenv_t, not the original buffers.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2022-08-19 04:49:41 -04:00 committed by Junio C Hamano
parent 795ea8776b
commit f1d019071e
3 changed files with 3 additions and 5 deletions

View File

@ -326,7 +326,7 @@ int xdl_do_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
} }
if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF) { if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF) {
res = xdl_do_histogram_diff(mf1, mf2, xpp, xe); res = xdl_do_histogram_diff(xpp, xe);
goto out; goto out;
} }

View File

@ -58,7 +58,6 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
xdemitconf_t const *xecfg); xdemitconf_t const *xecfg);
int xdl_do_patience_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, int xdl_do_patience_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
xdfenv_t *env); xdfenv_t *env);
int xdl_do_histogram_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, int xdl_do_histogram_diff(xpparam_t const *xpp, xdfenv_t *env);
xdfenv_t *env);
#endif /* #if !defined(XDIFFI_H) */ #endif /* #if !defined(XDIFFI_H) */

View File

@ -362,8 +362,7 @@ static int histogram_diff(xpparam_t const *xpp, xdfenv_t *env,
return result; return result;
} }
int xdl_do_histogram_diff(mmfile_t *file1, mmfile_t *file2, int xdl_do_histogram_diff(xpparam_t const *xpp, xdfenv_t *env)
xpparam_t const *xpp, xdfenv_t *env)
{ {
return histogram_diff(xpp, env, return histogram_diff(xpp, env,
env->xdf1.dstart + 1, env->xdf1.dend - env->xdf1.dstart + 1, env->xdf1.dstart + 1, env->xdf1.dend - env->xdf1.dstart + 1,