]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: prefer < 0 to == -1
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Aug 2025 14:58:08 +0000 (07:58 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Aug 2025 02:48:06 +0000 (19:48 -0700)
commit15c67b79af7df75c28af1e462619722c73676184
tree760bfdfa236bb837974de7636423f4d6c2f474f2
parent976f8abc19231ceea97b1ad90dd1da9bbfa30cea
tail: prefer < 0 to == -1

* src/tail.c (valid_file_spec, recheck, writers_are_dead)
(tail_forever, check_fspec, tail_forever_inotify, tail_file)
(parse_options, main): Be a bit more systematic about checking
for sign, rather than for exact equality or inequality,
when the sign is enough.  Makes the code a bit clearer
now that -2 sometimes means success.
src/tail.c