diff options
Diffstat (limited to 'src/head.c')
-rw-r--r-- | src/head.c | 10 |
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. */ |