Merge branch 'cb/fsmonitor-intfix' into maint
Variable type fix. * cb/fsmonitor-intfix: fsmonitor: avoid signed integer overflow / infinite loop
This commit is contained in:
commit
ea219657a3
@ -56,7 +56,7 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,
|
|||||||
|
|
||||||
void fill_fsmonitor_bitmap(struct index_state *istate)
|
void fill_fsmonitor_bitmap(struct index_state *istate)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
istate->fsmonitor_dirty = ewah_new();
|
istate->fsmonitor_dirty = ewah_new();
|
||||||
for (i = 0; i < istate->cache_nr; i++)
|
for (i = 0; i < istate->cache_nr; i++)
|
||||||
if (!(istate->cache[i]->ce_flags & CE_FSMONITOR_VALID))
|
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 */
|
size_t bol; /* beginning of line */
|
||||||
uint64_t last_update;
|
uint64_t last_update;
|
||||||
char *buf;
|
char *buf;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (!core_fsmonitor || istate->fsmonitor_has_run_once)
|
if (!core_fsmonitor || istate->fsmonitor_has_run_once)
|
||||||
return;
|
return;
|
||||||
@ -192,7 +192,7 @@ void refresh_fsmonitor(struct index_state *istate)
|
|||||||
|
|
||||||
void add_fsmonitor(struct index_state *istate)
|
void add_fsmonitor(struct index_state *istate)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (!istate->fsmonitor_last_update) {
|
if (!istate->fsmonitor_last_update) {
|
||||||
trace_printf_key(&trace_fsmonitor, "add fsmonitor");
|
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)
|
void tweak_fsmonitor(struct index_state *istate)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
int fsmonitor_enabled = git_config_get_fsmonitor();
|
int fsmonitor_enabled = git_config_get_fsmonitor();
|
||||||
|
|
||||||
if (istate->fsmonitor_dirty) {
|
if (istate->fsmonitor_dirty) {
|
||||||
|
Loading…
Reference in New Issue
Block a user