]> git.ipfire.org Git - thirdparty/git.git/commitdiff
xdiff: drop unused mmfile parameters from xdl_do_histogram_diff()
authorJeff King <peff@peff.net>
Fri, 19 Aug 2022 08:49:41 +0000 (04:49 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Aug 2022 19:20:24 +0000 (12:20 -0700)
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>
xdiff/xdiffi.c
xdiff/xdiffi.h
xdiff/xhistogram.c

index 53e803e6bcb249c38b0d09d7811fa207513ada81..8c64519eac97b5f87ba1457fb00f80608556aa5f 100644 (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) {
-               res = xdl_do_histogram_diff(mf1, mf2, xpp, xe);
+               res = xdl_do_histogram_diff(xpp, xe);
                goto out;
        }
 
index 8f1c7c8b0445f88514d0cb0ce868380d1711ccd2..9d988e0263ad1544dc7c4924cce0b6cee88134aa 100644 (file)
@@ -58,7 +58,6 @@ int xdl_emit_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb,
                  xdemitconf_t const *xecfg);
 int xdl_do_patience_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
                xdfenv_t *env);
-int xdl_do_histogram_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
-               xdfenv_t *env);
+int xdl_do_histogram_diff(xpparam_t const *xpp, xdfenv_t *env);
 
 #endif /* #if !defined(XDIFFI_H) */
index df909004c1057c011af3a97aba8ca4ecc722b8e0..16a8fe2f3f3df3fe52fee0ed6d527682a61a0dc8 100644 (file)
@@ -362,8 +362,7 @@ out:
        return result;
 }
 
-int xdl_do_histogram_diff(mmfile_t *file1, mmfile_t *file2,
-       xpparam_t const *xpp, xdfenv_t *env)
+int xdl_do_histogram_diff(xpparam_t const *xpp, xdfenv_t *env)
 {
        return histogram_diff(xpp, env,
                env->xdf1.dstart + 1, env->xdf1.dend - env->xdf1.dstart + 1,