DataFlash: fixed a build warning

This commit is contained in:
Andrew Tridgell 2014-03-25 13:31:21 +11:00
parent 2a9a89e020
commit 27dbf608c8

View File

@ -321,8 +321,8 @@ int16_t DataFlash_File::get_log_data(uint16_t log_num, uint16_t page, uint32_t o
bug. We can remove this once we find the real bug.
*/
if (ofs / 4096 != (ofs+len) / 4096) {
int seek_current = ::lseek(_read_fd, 0, SEEK_CUR);
if (seek_current != _read_offset) {
off_t seek_current = ::lseek(_read_fd, 0, SEEK_CUR);
if (seek_current != (off_t)_read_offset) {
::lseek(_read_fd, _read_offset, SEEK_SET);
}
}