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;
/* 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));
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. */
size_t match_length1 = match_length - 1; /* Speed optimization, non-regexp. */
/* Find the size of the input file. */
- file_pos = lseek (input_fd, (off_t) 0, SEEK_END);
+ file_pos = lseek (input_fd, 0, SEEK_END);
if (file_pos < 1)
return true; /* It's an empty file. */
}
}
- file_size = lseek (fd, (off_t) 0, SEEK_END);
+ file_size = lseek (fd, 0, SEEK_END);
ok = (file_size < 0 || isatty (fd)
? tac_nonseekable (fd, filename)
fstatus->failed = fstat (fd, &fstatus->st);
if (! fstatus->failed && S_ISREG (fstatus->st.st_mode)
- && (current_pos = lseek (fd, (off_t) 0, SEEK_CUR)) != -1
- && (end_pos = lseek (fd, (off_t) 0, SEEK_END)) != -1)
+ && (current_pos = lseek (fd, 0, SEEK_CUR)) != -1
+ && (end_pos = lseek (fd, 0, SEEK_END)) != -1)
{
/* Be careful here. The current position may actually be
beyond the end of the file. As in the example above. */