summaryrefslogtreecommitdiff
path: root/src/head.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-05-28 13:52:13 +0200
committerJim Meyering <meyering@redhat.com>2011-05-28 13:52:17 +0200
commitd0a9750e08a4cf0329f99a9956ab85f196a81263 (patch)
treef1a0c9ca465221c0f8c74126c314f5bf9acc6264 /src/head.c
parent963d809ae9d2ff4bc4844d2ebaf64a74deb1ae7e (diff)
downloadcoreutils-d0a9750e08a4cf0329f99a9956ab85f196a81263.tar.xz
maint: remove useless (off_t) cast of lseek arg
* src/wc.c (wc): Remove unnecessary cast. * src/head.c (elide_tail_bytes_file, elide_tail_lines_file): Likewise. * src/tac.c (tac_seekable, tac_file): Likewise.
Diffstat (limited to 'src/head.c')
-rw-r--r--src/head.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/head.c b/src/head.c
index b3ac7fdf8..84f9582e0 100644
--- a/src/head.c
+++ b/src/head.c
@@ -422,8 +422,8 @@ elide_tail_bytes_file (const char *filename, int fd, uintmax_t n_elide)
off_t diff;
enum Copy_fd_status err;
- if ((current_pos = lseek (fd, (off_t) 0, SEEK_CUR)) == -1
- || (end_pos = lseek (fd, (off_t) 0, SEEK_END)) == -1)
+ if ((current_pos = lseek (fd, 0, SEEK_CUR)) == -1
+ || (end_pos = lseek (fd, 0, SEEK_END)) == -1)
{
error (0, errno, _("cannot lseek %s"), quote (filename));
return false;
@@ -438,7 +438,7 @@ elide_tail_bytes_file (const char *filename, int fd, uintmax_t n_elide)
/* Seek back to `current' position, then copy the required
number of bytes from fd. */
- if (lseek (fd, (off_t) 0, current_pos) == -1)
+ if (lseek (fd, 0, current_pos) == -1)
{
error (0, errno, _("%s: cannot lseek back to original position"),
quote (filename));
@@ -716,8 +716,8 @@ elide_tail_lines_file (const char *filename, int fd, uintmax_t n_elide)
If found, write from current position to OFF, inclusive.
Otherwise, just return true. */
- off_t start_pos = lseek (fd, (off_t) 0, SEEK_CUR);
- off_t end_pos = lseek (fd, (off_t) 0, SEEK_END);
+ off_t start_pos = lseek (fd, 0, SEEK_CUR);
+ off_t end_pos = lseek (fd, 0, SEEK_END);
if (0 <= start_pos && start_pos < end_pos)
{
/* If the file is empty, we're done. */