diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2010-10-16 13:32:04 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-10-16 13:32:04 +0200 |
commit | 9c589e694f3c235d723ae80533f3bf09a5ac3702 (patch) | |
tree | 2c4287b61fdcd6985745a6b287c4c535d14f5804 | |
parent | 6728401351e9c6137cb9e10b5961bb1c2c0d237c (diff) | |
download | coreutils-9c589e694f3c235d723ae80533f3bf09a5ac3702.tar.xz |
fold: fix fadvise hint
* src/fold.c (fold_file): Apply fadvise to istream, not stdin.
This bug would have inhibited the fadvise optimization when not
reading from standard input.
-rw-r--r-- | src/fold.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fold.c b/src/fold.c index d5858568c..4da834b17 100644 --- a/src/fold.c +++ b/src/fold.c @@ -143,7 +143,7 @@ fold_file (char const *filename, size_t width) return false; } - fadvise (stdin, FADVISE_SEQUENTIAL); + fadvise (istream, FADVISE_SEQUENTIAL); while ((c = getc (istream)) != EOF) { |