Merge branch 'cb/fsmonitor-intfix' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 29 Jul 2019 19:38:15 +0000 (12:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Jul 2019 19:38:15 +0000 (12:38 -0700)
Variable type fix.

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

1  2 
fsmonitor.c
diff --cc fsmonitor.c
index 1dee0aded1c433c7cfb90195328f270559c9b421,df55d9dc2293615361b12b1e41219a479c1f073e..231e83a94db58e4efb2f4d7a1dbe90220bd2f317
@@@ -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");
        /*