Don't use memmove() for simple assignment
This commit is contained in:
parent
c10a612f90
commit
318ca1fb7e
|
@ -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 );
|
||||||
|
|
Loading…
Reference in New Issue