diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:05:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:24 +0100 |
commit | d57d81e529a44d8042401e36057a69ebe97e870a (patch) | |
tree | 3c434c6998bb9c8754c9b662c4bdb485c0aff29b /sal/rtl/random.cxx | |
parent | Clean up C-style casts from pointers to void (diff) | |
download | core-d57d81e529a44d8042401e36057a69ebe97e870a.tar.gz core-d57d81e529a44d8042401e36057a69ebe97e870a.zip |
Clean up C-style casts from pointers to void
Change-Id: I5e370445affbcd32b05588111f74590bf24f39d6
Diffstat (limited to 'sal/rtl/random.cxx')
-rw-r--r-- | sal/rtl/random.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx index 912074eb789f..0a5638f57423 100644 --- a/sal/rtl/random.cxx +++ b/sal/rtl/random.cxx @@ -269,7 +269,7 @@ static void __rtl_random_readPool ( rtlRandomPool SAL_CALL rtl_random_createPool() SAL_THROW_EXTERN_C() { RandomPool_Impl *pImpl = (RandomPool_Impl*)NULL; - pImpl = (RandomPool_Impl*)rtl_allocateZeroMemory (sizeof(RandomPool_Impl)); + pImpl = static_cast<RandomPool_Impl*>(rtl_allocateZeroMemory (sizeof(RandomPool_Impl))); if (pImpl) { if (!__rtl_random_initPool (pImpl)) @@ -286,7 +286,7 @@ rtlRandomPool SAL_CALL rtl_random_createPool() SAL_THROW_EXTERN_C() */ void SAL_CALL rtl_random_destroyPool (rtlRandomPool Pool) SAL_THROW_EXTERN_C() { - RandomPool_Impl *pImpl = (RandomPool_Impl *)Pool; + RandomPool_Impl *pImpl = static_cast<RandomPool_Impl *>(Pool); if (pImpl) { rtl_digest_destroy (pImpl->m_hDigest); @@ -300,8 +300,8 @@ void SAL_CALL rtl_random_destroyPool (rtlRandomPool Pool) SAL_THROW_EXTERN_C() rtlRandomError SAL_CALL rtl_random_addBytes ( rtlRandomPool Pool, const void *Buffer, sal_Size Bytes) SAL_THROW_EXTERN_C() { - RandomPool_Impl *pImpl = (RandomPool_Impl *)Pool; - const sal_uInt8 *pBuffer = (const sal_uInt8 *)Buffer; + RandomPool_Impl *pImpl = static_cast<RandomPool_Impl *>(Pool); + const sal_uInt8 *pBuffer = static_cast<const sal_uInt8 *>(Buffer); if ((pImpl == NULL) || (pBuffer == NULL)) return rtl_Random_E_Argument; @@ -316,8 +316,8 @@ rtlRandomError SAL_CALL rtl_random_addBytes ( rtlRandomError SAL_CALL rtl_random_getBytes ( rtlRandomPool Pool, void *Buffer, sal_Size Bytes) SAL_THROW_EXTERN_C() { - RandomPool_Impl *pImpl = (RandomPool_Impl *)Pool; - sal_uInt8 *pBuffer = (sal_uInt8 *)Buffer; + RandomPool_Impl *pImpl = static_cast<RandomPool_Impl *>(Pool); + sal_uInt8 *pBuffer = static_cast<sal_uInt8 *>(Buffer); if ((pImpl == NULL) || (pBuffer == NULL)) return rtl_Random_E_Argument; |