diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-02-06 07:35:46 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-02-06 12:10:08 -0800 |
| commit | 81879123c32d06406de5bfaf68baf6029660ca2a (patch) | |
| tree | de72790ca9f01e54bcb7e0a1f73298939f771ae6 /reftable/basics.c | |
| parent | 47616c4399d958b8a9f40b1ad70071d2e3c56126 (diff) | |
| download | git-81879123c32d06406de5bfaf68baf6029660ca2a.tar.gz | |
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>
Diffstat (limited to 'reftable/basics.c')
| -rw-r--r-- | reftable/basics.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/reftable/basics.c b/reftable/basics.c index af9004cec2..0785aff941 100644 --- a/reftable/basics.c +++ b/reftable/basics.c @@ -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; } |
