diff options
| author | erdgeist <> | 2009-01-15 22:10:54 +0000 |
|---|---|---|
| committer | erdgeist <> | 2009-01-15 22:10:54 +0000 |
| commit | 4ced0484abae55546e04954b3dafad46f9db348a (patch) | |
| tree | 945111cb3d8712fd6c26d281dca535b3863d78a8 /ot_clean.c | |
| parent | 02b3abbab639625afdd02f0f0a9965fdf49f4996 (diff) | |
Some premature optimization lead to always only 8bytes of ot_peers being copied
Diffstat (limited to 'ot_clean.c')
| -rw-r--r-- | ot_clean.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -33,7 +33,7 @@ static ssize_t clean_single_bucket( ot_peer *peers, size_t peer_count, time_t ti | |||
| 33 | while( peers < last_peer ) | 33 | while( peers < last_peer ) |
| 34 | if( ( timediff = timedout + OT_PEERTIME( peers ) ) < OT_PEER_TIMEOUT ) { | 34 | if( ( timediff = timedout + OT_PEERTIME( peers ) ) < OT_PEER_TIMEOUT ) { |
| 35 | OT_PEERTIME( peers ) = timediff; | 35 | OT_PEERTIME( peers ) = timediff; |
| 36 | *(uint64_t*)(insert_point++) = *(uint64_t*)(peers++); | 36 | memcpy( insert_point++, peers++, sizeof(ot_peer)); |
| 37 | } else | 37 | } else |
| 38 | if( OT_PEERFLAG( peers++ ) & PEER_FLAG_SEEDING ) | 38 | if( OT_PEERFLAG( peers++ ) & PEER_FLAG_SEEDING ) |
| 39 | (*removed_seeders)++; | 39 | (*removed_seeders)++; |
