Skip to content

Commit 5c11529

Browse files
pks-tgitster
authored andcommitted
reftable/pq: use size_t to track iterator index
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a2082db commit 5c11529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reftable/pq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ license that can be found in the LICENSE file or at
1212
#include "record.h"
1313

1414
struct pq_entry {
15-
int index;
15+
size_t index;
1616
struct reftable_record rec;
1717
};
1818

0 commit comments

Comments
 (0)