reftable/stack: use size_t
to track stack length
While the stack length is already stored as `size_t`, we frequently use `int`s to refer to those stacks throughout the reftable library. Convert those cases to use `size_t` instead to make things consistent. 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
47616c4399
commit
81879123c3
@ -64,12 +64,11 @@ void free_names(char **a)
|
||||
reftable_free(a);
|
||||
}
|
||||
|
||||
int names_length(char **names)
|
||||
size_t names_length(char **names)
|
||||
{
|
||||
char **p = names;
|
||||
for (; *p; p++) {
|
||||
/* empty */
|
||||
}
|
||||
while (*p)
|
||||
p++;
|
||||
return p - names;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user