diff options
Diffstat (limited to '')
-rw-r--r-- | src/input/plugins/FileInputPlugin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input/plugins/FileInputPlugin.cxx b/src/input/plugins/FileInputPlugin.cxx index 60c316567..922c54b79 100644 --- a/src/input/plugins/FileInputPlugin.cxx +++ b/src/input/plugins/FileInputPlugin.cxx @@ -101,13 +101,13 @@ input_file_open(const char *filename, bool FileInputStream::Seek(offset_type new_offset, Error &error) { - new_offset = (offset_type)lseek(fd, (off_t)new_offset, SEEK_SET); - if (new_offset < 0) { + auto result = lseek(fd, (off_t)new_offset, SEEK_SET); + if (result < 0) { error.SetErrno("Failed to seek"); return false; } - offset = new_offset; + offset = (offset_type)result; return true; } |