From de51745f588a2e2aa933e4c33fae3d9a10385eb1 Mon Sep 17 00:00:00 2001 From: jailletc36 Date: Sun, 11 Nov 2012 11:51:07 +0100 Subject: Turn some memmove into memcpy when it is safe to do so. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Most of the changes are related to newly allocated memory, so we are sure it can not overlap with the source of the copy. Change-Id: Ie6ccf1bbb07b792fb18601a38dfaa55755d14b7d Signed-off-by: jailletc36 Reviewed-on: https://gerrit.libreoffice.org/1033 Reviewed-by: Tor Lillqvist Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- rsc/source/res/rscrange.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rsc') diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx index ac291b87a4b0..7619ee5df0a2 100644 --- a/rsc/source/res/rscrange.cxx +++ b/rsc/source/res/rscrange.cxx @@ -275,7 +275,7 @@ ERRTYPE RscLongRange::SetNumber( const RSCINST & rInst, sal_Int32 nValue ) if( nMax < nValue || nMin > nValue ) return( ERR_RSCRANGE_OUTDEFSET ); void * pData = &((RscLongRangeInst*)rInst.pData)->nValue; - memmove( pData, &nValue, sizeof( sal_Int32 ) ); + memcpy( pData, &nValue, sizeof( sal_Int32 ) ); ((RscLongRangeInst *)rInst.pData)->bDflt = sal_False; return( ERR_OK ); } @@ -323,7 +323,7 @@ RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt, else lDflt = nMin; void * pData = &((RscLongRangeInst*)aInst.pData)->nValue; - memmove( pData, &lDflt, sizeof( sal_Int32 ) ); + memcpy( pData, &lDflt, sizeof( sal_Int32 ) ); ((RscLongRangeInst *)aInst.pData)->bDflt = sal_True; } -- cgit