Merge "Fix lseek() check"

This commit is contained in:
Treehugger Robot 2020-10-26 17:24:31 +00:00 committed by Gerrit Code Review
commit df17454a84

View file

@ -135,7 +135,7 @@ bool CowReader::ParseOps() {
}
auto& current_op = ops_buffer->data()[current_op_num];
pos = lseek(fd_.get(), GetNextOpOffset(current_op), SEEK_CUR);
if (pos < 0) {
if (pos == uint64_t(-1)) {
PLOG(ERROR) << "lseek next op failed";
return false;
}