summaryrefslogtreecommitdiff
path: root/src/od.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-01-22 18:15:57 +0000
committerJim Meyering <jim@meyering.net>2002-01-22 18:15:57 +0000
commit7e37a5e5e18a1a28377085cc19bca2e932951909 (patch)
treea4560d6c9e2f632ab815fe5c98db25de459d3bd3 /src/od.c
parentd283021a71673ff1a13c2954aa2cf781391d99fd (diff)
downloadcoreutils-7e37a5e5e18a1a28377085cc19bca2e932951909.tar.xz
(skip): Remove redundant check for overflow.
fseeko's seek argument is already known to be in range, since it is less than the file size.
Diffstat (limited to 'src/od.c')
-rw-r--r--src/od.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/od.c b/src/od.c
index 04daa8eff..9a2a4223e 100644
--- a/src/od.c
+++ b/src/od.c
@@ -1081,10 +1081,7 @@ skip (uintmax_t n_skip)
n_skip -= file_stats.st_size;
else
{
- off_t offset = n_skip;
- if (offset == n_skip && 0 <= offset
- ? fseeko (in_stream, offset, SEEK_CUR) != 0
- : (errno = EOVERFLOW, 1))
+ if (fseeko (in_stream, n_skip, SEEK_CUR) != 0)
{
error (0, errno, "%s", input_filename);
err = 1;