diff options
| author | Jan Sucan <jan@jansucan.com> | 2024-04-27 15:58:59 +0200 |
|---|---|---|
| committer | Ján Sučan <jan@jansucan.com> | 2024-04-27 16:16:36 +0200 |
| commit | 4387433f3bc125ed8dd08bd974efd8f00fcb5949 (patch) | |
| tree | 6a5fe468b5a76c469d3fc0d0483f37a7ba745a97 /src/restore.cpp | |
| parent | 6a4d6d3f5fb59fc6dd05a1b478a29dc5ae1344fa (diff) | |
Fix issues reported by cppcheck
Diffstat (limited to 'src/restore.cpp')
| -rw-r--r-- | src/restore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/restore.cpp b/src/restore.cpp index 3f5f4cf..c9ace96 100644 --- a/src/restore.cpp +++ b/src/restore.cpp @@ -188,7 +188,8 @@ restore(const OptionsRestore &opts) char *in_buffer = res.in_buffer.get(); for (size_t s = 0; s < in_sectors_read; ++s) { - const uint64_t out_offset = le64toh(*((uint64_t *)in_buffer)); + const uint64_t out_offset = + le64toh(*(reinterpret_cast<uint64_t *>(in_buffer))); in_buffer += sizeof(uint64_t); if (!res.out_file.seekp(out_offset, std::ios_base::beg)) { |
