summaryrefslogtreecommitdiff
path: root/src/tac.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-03-20 19:21:01 +0100
committerJim Meyering <meyering@redhat.com>2012-03-21 22:00:17 +0100
commitee7740c300f38205b114b6ae34ccf4c5aa4d9134 (patch)
tree0d9a8cdfee528754e79d617d2ff1ba1a6c6224f5 /src/tac.c
parent89bf03c9a1b11b75d7c9e44593493017bf8a3b99 (diff)
downloadcoreutils-ee7740c300f38205b114b6ae34ccf4c5aa4d9134.tar.xz
maint: use more modern fseeko, rather than fseek
* src/tac.c (temp_stream): Use fseeko, not fseek, on principle: use the more modern interface. In general it is better to avoid fseek due to its ABI-imposed 4GiB limit on the "offset", here its use was fine because the offset was always 0. Using fseeko also has the advantage of not triggering a GNULIB_POSIXCHECK warning. Reported by Eric Blake in http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2426/focus=2489
Diffstat (limited to 'src/tac.c')
-rw-r--r--src/tac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tac.c b/src/tac.c
index 670b20dc6..b50382d42 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -470,7 +470,7 @@ temp_stream (FILE **fp, char **file_name)
}
else
{
- if (fseek (tmp_fp, 0, SEEK_SET) < 0
+ if (fseeko (tmp_fp, 0, SEEK_SET) < 0
|| ftruncate (fileno (tmp_fp), 0) < 0)
{
error (0, errno, _("failed to rewind stream for %s"),