]> git.ipfire.org Git - thirdparty/git.git/commitdiff
xdiff: change rindex from long to size_t in xdfile_t
authorEzekiel Newren <ezekielnewren@gmail.com>
Wed, 29 Oct 2025 22:19:47 +0000 (22:19 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Oct 2025 14:13:35 +0000 (07:13 -0700)
rindex describes a index offset which means it's an index into memory
which should use size_t.

Changing the type of rindex from long to size_t has no cascading
refactor impact because it is only ever used to directly index other
arrays.

Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xtypes.h

index df4c5cab1ac3f43e9d28826318a33b175d5d1779..3bcc0920e08bdf12c87a9c62ae7c9558879dcdc0 100644 (file)
@@ -49,7 +49,7 @@ typedef struct s_xdfile {
        xrecord_t *recs;
        size_t nrec;
        bool *changed;
-       long *rindex;
+       size_t *rindex;
        size_t nreff;
        ptrdiff_t dstart, dend;
 } xdfile_t;