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