diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-18 09:21:32 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-18 09:21:32 +0000 |
commit | 76d04a0284799e89fb758453a5b537f591ce9125 (patch) | |
tree | 0016acc0666cec2b606b277d9feb0e3e52872d8a /cpukit | |
parent | 2011-10-18 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-76d04a0284799e89fb758453a5b537f591ce9125.tar.bz2 |
2011-10-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/shell/fts.c: Conditionally use var "nostat".
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 1 | ||||
-rw-r--r-- | cpukit/libmisc/shell/fts.c | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 0b4f4facde..b65641ec51 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,6 @@ 2011-10-18 Ralf Corsépius <ralf.corsepius@rtems.org> + * libmisc/shell/fts.c: Conditionally use var "nostat". * pppd/options.c: Remove unused var "ok". * libnetworking/rtems/rtems_dhcp.c: Remove unused var "disconnected". diff --git a/cpukit/libmisc/shell/fts.c b/cpukit/libmisc/shell/fts.c index 2fd91b874c..32572c7d2f 100644 --- a/cpukit/libmisc/shell/fts.c +++ b/cpukit/libmisc/shell/fts.c @@ -643,7 +643,11 @@ fts_build(FTS *sp, int type) DIR *dirp; void *oldaddr; size_t dnamlen; - int cderrno, descend, level, nlinks, saved_errno, nostat, doadjust; + int cderrno, descend, level, nlinks, saved_errno; +#ifdef DT_DIR + int nostat; +#endif + int doadjust; size_t len, maxlen; #ifdef FTS_WHITEOUT int oflag; @@ -682,13 +686,19 @@ fts_build(FTS *sp, int type) */ if (type == BNAMES) { nlinks = 0; +#ifdef DT_DIR nostat = 1; +#endif } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); +#ifdef DT_DIR nostat = 1; +#endif } else { nlinks = -1; +#ifdef DT_DIR nostat = 0; +#endif } #ifdef notdef |