[PATCH v5 3/6] xdiff/xdl_cleanup_records: use unambiguous types
- From
Ezekiel Newren via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Apr 8, 2026, 20:26 UTC
- Message-ID
- <85aa0da90c62d9217ac2a3f907c37855a95298b9.1775679988.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.2156.v5.git.git.1775679988.gitgitgadget@gmail.com>
From: Ezekiel Newren <ezekielnewren@gmail.com>
Change the parameters of xdl_clean_mmatch() and the local variables i, nm, mlim in xdl_cleanup_records() to use unambiguous types. Best viewed with --color-words.
Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com> --- xdiff/xprepare.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c index 48fb5ce6fe..386668a92d 100644 --- a/xdiff/xprepare.c +++ b/xdiff/xprepare.c @@ -197,8 +197,8 @@ void xdl_free_env(xdfenv_t *xe) { } -static bool xdl_clean_mmatch(uint8_t const *action, long i, long s, long e) { - long r, rdis0, rpdis0, rdis1, rpdis1; +static bool xdl_clean_mmatch(uint8_t const *action, ptrdiff_t i, ptrdiff_t s, ptrdiff_t e) { + ptrdiff_t r, rdis0, rpdis0, rdis1, rpdis1; /* * Limits the window that is examined during the similar-lines @@ -268,7 +268,7 @@ static bool xdl_clean_mmatch(uint8_t const *action, long i, long s, long e) { * might be potentially discarded if they appear in a run of discardable. */ static int xdl_cleanup_records(xdlclassifier_t *cf, xdfile_t *xdf1, xdfile_t *xdf2) { - long i, nm, mlim; + ptrdiff_t i, nm, mlim; xdlclass_t *rcrec; uint8_t *action1 = NULL, *action2 = NULL; bool need_min = !!(cf->flags & XDF_NEED_MINIMAL);
-- gitgitgadget