From 4ced0484abae55546e04954b3dafad46f9db348a Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Thu, 15 Jan 2009 22:10:54 +0000 Subject: Some premature optimization lead to always only 8bytes of ot_peers being copied --- ot_clean.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ot_clean.c') diff --git a/ot_clean.c b/ot_clean.c index 11c85ab..6ce1941 100644 --- a/ot_clean.c +++ b/ot_clean.c @@ -33,7 +33,7 @@ static ssize_t clean_single_bucket( ot_peer *peers, size_t peer_count, time_t ti while( peers < last_peer ) if( ( timediff = timedout + OT_PEERTIME( peers ) ) < OT_PEER_TIMEOUT ) { OT_PEERTIME( peers ) = timediff; - *(uint64_t*)(insert_point++) = *(uint64_t*)(peers++); + memcpy( insert_point++, peers++, sizeof(ot_peer)); } else if( OT_PEERFLAG( peers++ ) & PEER_FLAG_SEEDING ) (*removed_seeders)++; -- cgit v1.2.3