The manual says that -s0 will process 0-sized files normally,
but as it stands (a) hardlink considers 0-sized files unlinkable
(so, with -l, unlistable) and (b) fileeq considers reading an empty
prologue to be an error
return -1;
rsz = read_all(fd, (char *) data->intro, sizeof(data->intro));
DBG(DATA, ul_debugobj(data, " read %zu bytes intro", sizeof(data->intro)));
- if (rsz <= 0)
+ if (rsz < 0)
return -1;
data->nblocks = 1;
}
*/
static int file_may_link_to(const struct file *a, const struct file *b)
{
- return (a->st.st_size != 0 &&
- a->st.st_size == b->st.st_size &&
+ return (a->st.st_size == b->st.st_size &&
a->links != NULL && b->links != NULL &&
a->st.st_dev == b->st.st_dev &&
a->st.st_ino != b->st.st_ino &&