diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-09 16:42:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-09 16:42:36 +0000 |
commit | d8316cfb8392bed21f404fedcc8ddca7b23a75fa (patch) | |
tree | 48dc7424023ff6ec83e96e5117fc81b4812ccd51 /usr.bin/less/filename.c | |
parent | 09e0a564ee0d7993ffe3cd115be1e567dfcb464d (diff) |
use (off_t)-1 rather than a BAD_LSEEK wrapper
Diffstat (limited to 'usr.bin/less/filename.c')
-rw-r--r-- | usr.bin/less/filename.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/less/filename.c b/usr.bin/less/filename.c index 43548aed45e..3ed929bd195 100644 --- a/usr.bin/less/filename.c +++ b/usr.bin/less/filename.c @@ -341,7 +341,7 @@ bin_file(int f) if (!seekable(f)) return (0); - if (lseek(f, (off_t)0, SEEK_SET) == BAD_LSEEK) + if (lseek(f, (off_t)0, SEEK_SET) == (off_t)-1) return (0); n = read(f, data, sizeof (data)); pend = &data[n]; @@ -370,7 +370,7 @@ seek_filesize(int f) off_t spos; spos = lseek(f, (off_t)0, SEEK_END); - if (spos == BAD_LSEEK) + if (spos == (off_t)-1) return (-1); return (spos); } |