From 1a4799c4adbb9cfa141b211b291fe24bf6ec549c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 27 Oct 2024 14:32:05 +0100 Subject: [PATCH] fixup --- src/disk_cache.cpp | 2 +- src/pread_disk_io.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/disk_cache.cpp b/src/disk_cache.cpp index bb8ba624a0..2939f7337c 100644 --- a/src/disk_cache.cpp +++ b/src/disk_cache.cpp @@ -163,7 +163,7 @@ bool disk_cache::try_clear_piece(piece_location const loc, pread_disk_job* j, jo TORRENT_ASSERT(!i->hashing); if (i->hashing) { - // postpone the clearing until we're done flushing + // postpone the clearing until we're done hashing view.modify(i, [&](cached_piece_entry& e) { e.clear_piece = j; }); return false; } diff --git a/src/pread_disk_io.cpp b/src/pread_disk_io.cpp index 49a1c49540..6f8ce58c79 100644 --- a/src/pread_disk_io.cpp +++ b/src/pread_disk_io.cpp @@ -1352,7 +1352,7 @@ int pread_disk_io::flush_cache_blocks(bitfield& flushed ret += count; if (error) { - int i = start_idx + count; + TORRENT_ASSERT(i == start_idx + count); // if there was a failure, fail the remaining jobs as well for (aux::cached_block_entry const& blk : blocks.subspan(start_idx + count)) {