fts: nlink_t signedness fixups
commit9c7ef4eef9540a0a762c4781d7ed5a1b8623e59b
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 25 Jul 2017 06:21:57 +0000 (24 23:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 25 Jul 2017 07:27:46 +0000 (25 00:27 -0700)
treed655005570ac2f7028759c4377b513425a330416
parentb7363b496caf60600eefa0a5f2d37f77a5dee606
fts: nlink_t signedness fixups

* lib/fts.c (fts_open): Set rootparent n_dirs_remaining to -1
so that root need not be a special case later.
(fts_read): Remove now-redundant test for fts_level.
Do not assume that nlink_t is signed.
(fts_build): Remove useless decrement of nlinks.
(fts_stat): Avoid unlikely signed integer overflow later, if
nlink_t is signed.
ChangeLog
lib/fts.c
lib/fts_.h