diff --git a/ChangeLog b/ChangeLog index 460d9eca..0e9b1374 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-10 Tatsuhiro Tsujikawa + + Removed unused code. + * src/DefaultBtAnnounce.cc + 2008-11-10 Tatsuhiro Tsujikawa Fixed the bug that DefaultPieceStorage::getCompletedLength() returns diff --git a/src/DefaultBtAnnounce.cc b/src/DefaultBtAnnounce.cc index 3d16b892..5c00645c 100644 --- a/src/DefaultBtAnnounce.cc +++ b/src/DefaultBtAnnounce.cc @@ -132,10 +132,8 @@ std::string DefaultBtAnnounce::getAnnounceUrl() { numWant = 0; } TransferStat stat = peerStorage->calculateStat(); - uint64_t left = pieceStorage->getTotalLength()-pieceStorage->getCompletedLength(); - if(left < 0) { - left = 0; - } + uint64_t left = + pieceStorage->getTotalLength()-pieceStorage->getCompletedLength(); std::string url = announceList.getAnnounce()+ "?info_hash="+Util::torrentUrlencode(btContext->getInfoHash(), btContext->getInfoHashLength())+