diff options
author | jailletc36 <christophe.jaillet@wanadoo.fr> | 2012-11-11 11:51:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-14 16:48:17 +0000 |
commit | de51745f588a2e2aa933e4c33fae3d9a10385eb1 (patch) | |
tree | a15f8d5c02080f32df73bf2bbf13170bc7b8ac04 /rsc | |
parent | 5b1fcd5262f087e3d1cabb240d1761064baeafc6 (diff) |
Turn some memmove into memcpy when it is safe to do so.
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 <christophe.jaillet@wanadoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/1033
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'rsc')
-rw-r--r-- | rsc/source/res/rscrange.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |