Don't use memmove() for simple assignment

This commit is contained in:
Mukund Sivaraman 2008-08-22 16:34:16 +00:00
parent c10a612f90
commit 318ca1fb7e
1 changed files with 2 additions and 2 deletions

View File

@ -720,7 +720,7 @@ refillPulse( void * vtorrent )
{
case TR_ADDREQ_FULL:
case TR_ADDREQ_CLIENT_CHOKED:
memmove( peers+j, peers + --peerCount, sizeof *peers );
peers[j] = peers[--peerCount];
break;
case TR_ADDREQ_MISSING:
case TR_ADDREQ_DUPLICATE:
@ -743,7 +743,7 @@ refillPulse( void * vtorrent )
switch( val )
{
case TR_ADDREQ_FULL:
memmove( webseeds+j, webseeds + --webseedCount, sizeof *webseeds );
webseeds[j] = webseeds[--webseedCount];
break;
case TR_ADDREQ_OK:
tr_bitfieldAdd( t->requestedPieces, piece );