]> git.ipfire.org Git - thirdparty/git.git/commitdiff
reftable/pq: use `size_t` to track iterator index
authorPatrick Steinhardt <ps@pks.im>
Mon, 4 Mar 2024 10:48:47 +0000 (11:48 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Mar 2024 18:19:30 +0000 (10:19 -0800)
The reftable priority queue is used by the merged iterator to yield
records from its sub-iterators in the expected order. Each entry has a
record corresponding to such a sub-iterator as well as an index that
indicates which sub-iterator the record belongs to. But while the
sub-iterators are tracked with a `size_t`, we store the index as an
`int` in the entry.

Fix this and use `size_t` consistently.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/pq.h

index e85bac9b52e0039bd378cb1073215af4d48196c7..9e25a43a36e50f7492990b4228c16725df516b80 100644 (file)
@@ -12,7 +12,7 @@ https://developers.google.com/open-source/licenses/bsd
 #include "record.h"
 
 struct pq_entry {
-       int index;
+       size_t index;
        struct reftable_record rec;
 };