Merge "Fix lseek() check"
This commit is contained in:
commit
df17454a84
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ bool CowReader::ParseOps() {
|
||||||
}
|
}
|
||||||
auto& current_op = ops_buffer->data()[current_op_num];
|
auto& current_op = ops_buffer->data()[current_op_num];
|
||||||
pos = lseek(fd_.get(), GetNextOpOffset(current_op), SEEK_CUR);
|
pos = lseek(fd_.get(), GetNextOpOffset(current_op), SEEK_CUR);
|
||||||
if (pos < 0) {
|
if (pos == uint64_t(-1)) {
|
||||||
PLOG(ERROR) << "lseek next op failed";
|
PLOG(ERROR) << "lseek next op failed";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue