* src/tail.c (tail_forever_inotify): Remove the redundant and
incorrect error check of the return from inotify_add_watch().
Also initialize the wd member of each File_spec to an invalid value.
Reported by C de-Avillez.
if (evlen < fnlen)
evlen = fnlen;
- f[i].wd = 0;
+ f[i].wd = -1;
if (follow_mode == Follow_name)
{
if (hash_insert (wd_table, &(f[i])) == NULL)
xalloc_die ();
- if (follow_mode == Follow_name || f[i].wd)
- found_watchable = true;
+ found_watchable = true;
}
}