* fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for
non-error return from lseek.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user