Browse Source

DataFlash: fixed a build warning

mission-4.1.18
Andrew Tridgell 11 years ago
parent
commit
27dbf608c8
  1. 4
      libraries/DataFlash/DataFlash_File.cpp

4
libraries/DataFlash/DataFlash_File.cpp

@ -321,8 +321,8 @@ int16_t DataFlash_File::get_log_data(uint16_t log_num, uint16_t page, uint32_t o @@ -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);
}
}

Loading…
Cancel
Save