mirror of
https://github.com/transmission/transmission
synced 2025-02-22 14:10:34 +00:00
(trunk libT) remove dead variable pieceBytesRead from verify.c. Reported by Longinus00
This commit is contained in:
parent
b91ddc4a27
commit
5c46cdb161
1 changed files with 1 additions and 5 deletions
|
@ -54,7 +54,6 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
|
|||
tr_bool hadPiece = 0;
|
||||
time_t lastSleptAt = 0;
|
||||
uint32_t piecePos = 0;
|
||||
uint32_t pieceBytesRead = 0;
|
||||
tr_file_index_t fileIndex = 0;
|
||||
tr_file_index_t prevFileIndex = !fileIndex;
|
||||
tr_piece_index_t pieceIndex = 0;
|
||||
|
@ -103,12 +102,10 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
|
|||
const ssize_t numRead = tr_pread( fd, buffer, bytesThisPass, filePos );
|
||||
if( numRead == (ssize_t)bytesThisPass )
|
||||
SHA1_Update( &sha, buffer, numRead );
|
||||
if( numRead > 0 ) {
|
||||
pieceBytesRead += numRead;
|
||||
#if defined HAVE_POSIX_FADVISE && defined POSIX_FADV_DONTNEED
|
||||
if( numRead > 0 )
|
||||
posix_fadvise( fd, filePos, bytesThisPass, POSIX_FADV_DONTNEED );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* move our offsets */
|
||||
|
@ -150,7 +147,6 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
|
|||
SHA1_Init( &sha );
|
||||
++pieceIndex;
|
||||
piecePos = 0;
|
||||
pieceBytesRead = 0;
|
||||
}
|
||||
|
||||
/* if we're finishing a file... */
|
||||
|
|
Loading…
Reference in a new issue