summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2010-10-16 13:32:04 +0200
committerJim Meyering <meyering@redhat.com>2010-10-16 13:32:04 +0200
commit9c589e694f3c235d723ae80533f3bf09a5ac3702 (patch)
tree2c4287b61fdcd6985745a6b287c4c535d14f5804 /src
parent6728401351e9c6137cb9e10b5961bb1c2c0d237c (diff)
downloadcoreutils-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.
Diffstat (limited to 'src')
-rw-r--r--src/fold.c2
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)
{