refs: use size_t indexes when iterating over ref transaction updates

Eliminate any chance of integer overflow on platforms where the two
types have different sizes.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael Haggerty
2017-05-22 16:17:37 +02:00
committed by Junio C Hamano
parent c759971816
commit 43a2dfde76
2 changed files with 5 additions and 3 deletions

2
refs.c
View File

@ -848,7 +848,7 @@ struct ref_transaction *ref_transaction_begin(struct strbuf *err)
void ref_transaction_free(struct ref_transaction *transaction)
{
int i;
size_t i;
if (!transaction)
return;