summaryrefslogtreecommitdiff
path: root/ot_vector.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_vector.c')
-rw-r--r--ot_vector.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ot_vector.c b/ot_vector.c
index 36b326a..479e832 100644
--- a/ot_vector.c
+++ b/ot_vector.c
@@ -157,8 +157,8 @@ void vector_remove_torrent( ot_vector *vector, ot_torrent *match ) {
157 157
158 /* If this is being called after a unsuccessful malloc() for peer_list 158 /* If this is being called after a unsuccessful malloc() for peer_list
159 in add_peer_to_torrent, match->peer_list actually might be NULL */ 159 in add_peer_to_torrent, match->peer_list actually might be NULL */
160 if( match->peer_list6) free_peerlist( match->peer_list6 ); 160 free_peerlist( match->peer_list6 );
161 if( match->peer_list4) free_peerlist( match->peer_list4 ); 161 free_peerlist( match->peer_list4 );
162 162
163 memmove( match, match + 1, sizeof(ot_torrent) * ( end - match - 1 ) ); 163 memmove( match, match + 1, sizeof(ot_torrent) * ( end - match - 1 ) );
164 if( ( --vector->size * OT_VECTOR_SHRINK_THRESH < vector->space ) && ( vector->space >= OT_VECTOR_SHRINK_RATIO * OT_VECTOR_MIN_MEMBERS ) ) { 164 if( ( --vector->size * OT_VECTOR_SHRINK_THRESH < vector->space ) && ( vector->space >= OT_VECTOR_SHRINK_RATIO * OT_VECTOR_MIN_MEMBERS ) ) {