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>

Jeff King committed Aug 19, 2022 at 04:49 UTC f1d019071ea68cb2bd2602b925d7a3726ded22e9
3 files changed +3 -5
xdiff/xdiffi.c
+1 -1
@@ -326,7 +326,7 @@ int xdl_do_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
326 }
327
328 if (XDF_DIFF_ALG(xpp->flags) == XDF_HISTOGRAM_DIFF) {
329 - res = xdl_do_histogram_diff(mf1, mf2, xpp, xe);
329 + res = xdl_do_histogram_diff(xpp, xe);
330 goto out;
331 }
332
xdiff/xdiffi.h
+1 -2
@@ -58,7 +58,6 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
58 xdemitconf_t const *xecfg);
59 int xdl_do_patience_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
60 xdfenv_t *env);
61 -int xdl_do_histogram_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
62 - xdfenv_t *env);
61 +int xdl_do_histogram_diff(xpparam_t const *xpp, xdfenv_t *env);
62
63 #endif /* #if !defined(XDIFFI_H) */
xdiff/xhistogram.c
+1 -2
@@ -362,8 +362,7 @@ out:
362 return result;
363 }
364
365 -int xdl_do_histogram_diff(mmfile_t *file1, mmfile_t *file2,
366 - xpparam_t const *xpp, xdfenv_t *env)
365 +int xdl_do_histogram_diff(xpparam_t const *xpp, xdfenv_t *env)
366 {
367 return histogram_diff(xpp, env,
368 env->xdf1.dstart + 1, env->xdf1.dend - env->xdf1.dstart + 1,