The previous commit started using size_t for our allocations. There are
some iterations that use int or unsigned, though. These aren't dangerous
with respect to memory, but they could produce incorrect results.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
for_each_oid_fn fn,
void *data)
{
- int i;
+ size_t i;
/* No oid_array_sort() here! See sha1-array.h */
for_each_oid_fn fn,
void *data)
{
- int i;
+ size_t i;
if (!array->sorted)
oid_array_sort(array);
for_each_oid_fn want,
void *cb_data)
{
- unsigned nr = array->nr, src, dst;
+ size_t nr = array->nr, src, dst;
struct object_id *oids = array->oid;
for (src = dst = 0; src < nr; src++) {