Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-05-22 17:17:37 +0300
committerJunio C Hamano <gitster@pobox.com>2017-05-23 08:29:53 +0300
commit43a2dfde76a4a47ffa31be11fd5cd7fe0b57bb84 (patch)
treec9d4664b2c42adcee4316a92548b40e03cb23baa /refs.c
parentc7599718167de62c437490e9ea300eeb9284a572 (diff)
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>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 8494b1f20d5..71139ba74e6 100644
--- a/refs.c
+++ b/refs.c
@@ -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;