From 3e97d0b9c2d83ad9dfde1bcb34f2ed1fa7628cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C5=93ur?= Date: Fri, 24 Mar 2023 01:05:11 +0800 Subject: [PATCH] fix: The right operand of '<' is a garbage value (#5285) --- libtransmission/completion.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libtransmission/completion.cc b/libtransmission/completion.cc index 63c08c75e..7bee7e7d5 100644 --- a/libtransmission/completion.cc +++ b/libtransmission/completion.cc @@ -172,9 +172,7 @@ void tr_completion::removeBlock(tr_block_index_t block) void tr_completion::removePiece(tr_piece_index_t piece) { - auto const [begin, end] = block_info_->blockSpanForPiece(piece); - - for (auto block = begin; block < end; ++block) + for (auto [block, end] = block_info_->blockSpanForPiece(piece); block < end; ++block) { removeBlock(block); }