summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_disk_file.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-08-19 21:44:58 +0000
committerChristopher Faylor <me@cgf.cx>2006-08-19 21:44:58 +0000
commitffa6849093a4f4051bc3052e40db31b282164869 (patch)
tree80ab1b738ea19dbe1dc64fe04e0ef66dda8898bf /winsup/cygwin/fhandler_disk_file.cc
parenta0922fcb048fb8c4c1cc59db5740f1e599287d16 (diff)
downloadcygnal-ffa6849093a4f4051bc3052e40db31b282164869.tar.gz
cygnal-ffa6849093a4f4051bc3052e40db31b282164869.tar.bz2
cygnal-ffa6849093a4f4051bc3052e40db31b282164869.zip
* fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for
non-error return from lseek.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index e1a4887ee..6a79d9e77 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1216,7 +1216,7 @@ fhandler_disk_file::pread (void *buf, size_t count, _off64_t offset)
{
size_t tmp_count = count;
read (buf, tmp_count);
- if (lseek (curpos, SEEK_SET) == 0)
+ if (lseek (curpos, SEEK_SET) >= 0)
res = (ssize_t) tmp_count;
else
res = -1;