summaryrefslogtreecommitdiff
path: root/fsmonitor.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:38 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-09 15:25:38 -0700
commitceca45541d0046544cc95acb6b849c14637e0e3e (patch)
tree957e14032b5f6b886c974f8e6860b3e123a52f74 /fsmonitor.c
parentMerge branch 'rs/avoid-overflow-in-midpoint-computation' (diff)
parentfsmonitor: avoid signed integer overflow / infinite loop (diff)
downloadtgif-ceca45541d0046544cc95acb6b849c14637e0e3e.tar.xz
Merge branch 'cb/fsmonitor-intfix'
Variable type fix. * cb/fsmonitor-intfix: fsmonitor: avoid signed integer overflow / infinite loop
Diffstat (limited to 'fsmonitor.c')
-rw-r--r--fsmonitor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fsmonitor.c b/fsmonitor.c
index 1dee0aded1..231e83a94d 100644
--- a/fsmonitor.c
+++ b/fsmonitor.c
@@ -56,7 +56,7 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,
void fill_fsmonitor_bitmap(struct index_state *istate)
{
- int i;
+ unsigned int i;
istate->fsmonitor_dirty = ewah_new();
for (i = 0; i < istate->cache_nr; i++)
if (!(istate->cache[i]->ce_flags & CE_FSMONITOR_VALID))
@@ -134,7 +134,7 @@ void refresh_fsmonitor(struct index_state *istate)
size_t bol; /* beginning of line */
uint64_t last_update;
char *buf;
- int i;
+ unsigned int i;
if (!core_fsmonitor || istate->fsmonitor_has_run_once)
return;
@@ -192,7 +192,7 @@ void refresh_fsmonitor(struct index_state *istate)
void add_fsmonitor(struct index_state *istate)
{
- int i;
+ unsigned int i;
if (!istate->fsmonitor_last_update) {
trace_printf_key(&trace_fsmonitor, "add fsmonitor");
@@ -225,7 +225,7 @@ void remove_fsmonitor(struct index_state *istate)
void tweak_fsmonitor(struct index_state *istate)
{
- int i;
+ unsigned int i;
int fsmonitor_enabled = git_config_get_fsmonitor();
if (istate->fsmonitor_dirty) {