From dc1099dd66edbf2bce04dae2c118452085160f2a Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 27 Jan 2007 16:42:57 +0000 Subject: Asserts were always false :/ --- trackerlogic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'trackerlogic.c') diff --git a/trackerlogic.c b/trackerlogic.c index dfff041..62c5972 100644 --- a/trackerlogic.c +++ b/trackerlogic.c @@ -214,7 +214,7 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer ) { case 0: continue; case 2: torrent->peer_list->seed_count[i]--; case 1: default: - assert( torrent->peer_list->seed_count[i] > 0 ); + assert( torrent->peer_list->seed_count[i] >= 0 ); assert( torrent->peer_list->seed_count[i] <= torrent->peer_list->peers[i].size ); return torrent; } @@ -225,7 +225,7 @@ ot_torrent *add_peer_to_torrent( ot_hash *hash, ot_peer *peer ) { if( !(OT_FLAG(peer_dest) & PEER_FLAG_SEEDING ) && (OT_FLAG(peer) & PEER_FLAG_SEEDING ) ) torrent->peer_list->seed_count[0]++; - assert( torrent->peer_list->seed_count[0] > 0 ); + assert( torrent->peer_list->seed_count[0] >= 0 ); assert( torrent->peer_list->seed_count[0] <= torrent->peer_list->peers[0].size ); } @@ -463,7 +463,7 @@ void remove_peer_from_torrent( ot_hash *hash, ot_peer *peer ) { case 0: continue; case 2: torrent->peer_list->seed_count[i]--; case 1: default: - assert( torrent->peer_list->seed_count[i] > 0 ); + assert( torrent->peer_list->seed_count[i] >= 0 ); assert( torrent->peer_list->seed_count[i] <= torrent->peer_list->peers[i].size ); return; } -- cgit v1.2.3