reftable/basics: fix return type of binsearch()
to be size_t
The `binsearch()` function can be used to find the first element for which a callback functions returns a truish value. But while the array size is of type `size_t`, the function in fact returns an `int` that is supposed to index into that array. Fix the function signature to return a `size_t`. This conversion does not change any semantics given that the function would only ever return a value in the range `[0, sz]` anyway. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
11c821f2f2
commit
3e7b36d129
@ -382,7 +382,8 @@ int block_reader_seek(struct block_reader *br, struct block_iter *it,
|
||||
};
|
||||
struct block_iter next = BLOCK_ITER_INIT;
|
||||
struct reftable_record rec;
|
||||
int err = 0, i;
|
||||
int err = 0;
|
||||
size_t i;
|
||||
|
||||
if (args.error) {
|
||||
err = REFTABLE_FORMAT_ERROR;
|
||||
|
Reference in New Issue
Block a user