Subject: [PATCH v4 02/10] xdiff: use ptrdiff_t for dstart/dend

From: "Ezekiel Newren via GitGitGadget" <[email-masked]>
Date: Fri, 14 Nov 2025 22:36:48 +0000

From: Ezekiel Newren <[email-masked]>

ptrdiff_t is appropriate for dstart and dend because they both describe
positive or negative offsets relative to a pointer.

Signed-off-by: Ezekiel Newren <[email-masked]>
---
 xdiff/xtypes.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdiff/xtypes.h b/xdiff/xtypes.h
index f145abba3e..7a2d429ec5 100644
--- a/xdiff/xtypes.h
+++ b/xdiff/xtypes.h
@@ -47,7 +47,7 @@ typedef struct s_xrecord {
 typedef struct s_xdfile {
 	xrecord_t *recs;
 	long nrec;
-	long dstart, dend;
+	ptrdiff_t dstart, dend;
 	bool *changed;
 	long *rindex;
 	long nreff;
-- 
gitgitgadget