Merge branch 'cb/fsmonitor-intfix'
authorJunio C Hamano <gitster@pobox.com>
Tue, 9 Jul 2019 22:25:38 +0000 (15:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 9 Jul 2019 22:25:38 +0000 (15:25 -0700)
Variable type fix.

* cb/fsmonitor-intfix:
  fsmonitor: avoid signed integer overflow / infinite loop

1  2 
fsmonitor.c

diff --cc fsmonitor.c
@@@ -134,11 -135,11 +134,11 @@@ void refresh_fsmonitor(struct index_sta
        size_t bol; /* beginning of line */
        uint64_t last_update;
        char *buf;
-       int i;
+       unsigned int i;
  
 -      if (!core_fsmonitor || has_run_once)
 +      if (!core_fsmonitor || istate->fsmonitor_has_run_once)
                return;
 -      has_run_once = 1;
 +      istate->fsmonitor_has_run_once = 1;
  
        trace_printf_key(&trace_fsmonitor, "refresh fsmonitor");
        /*