From: Mukund Sivaraman Date: Fri, 22 Aug 2008 16:34:16 +0000 (+0000) Subject: Don't use memmove() for simple assignment X-Git-Tag: 1.40~422 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=318ca1fb7e85b3c4c820297faf3927612f3dff10;p=transmission Don't use memmove() for simple assignment --- diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 2eff99468..f4649dbab 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -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 );