From dc1858783e72bba808dbd87b5b03d5170449ad52 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 27 Oct 2018 03:16:18 +0300 Subject: tdf#120703 (PVS): V519 The variable is assigned values twice successively Change-Id: I9265425a215609ef6bf4298ba39c8399f215ce27 Reviewed-on: https://gerrit.libreoffice.org/62406 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sal/rtl/digest.cxx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'sal/rtl') diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx index 706d1ffc5c67..c9d1f3918bb2 100644 --- a/sal/rtl/digest.cxx +++ b/sal/rtl/digest.cxx @@ -326,8 +326,7 @@ rtlDigestError SAL_CALL rtl_digest_MD2( rtlDigest SAL_CALL rtl_digest_createMD2() SAL_THROW_EXTERN_C() { - DigestMD2_Impl *pImpl = nullptr; - pImpl = RTL_DIGEST_CREATE(DigestMD2_Impl); + DigestMD2_Impl *pImpl = RTL_DIGEST_CREATE(DigestMD2_Impl); if (pImpl) { pImpl->m_digest = MD2; @@ -664,8 +663,7 @@ rtlDigestError SAL_CALL rtl_digest_MD5( rtlDigest SAL_CALL rtl_digest_createMD5() SAL_THROW_EXTERN_C() { - DigestMD5_Impl *pImpl = nullptr; - pImpl = RTL_DIGEST_CREATE(DigestMD5_Impl); + DigestMD5_Impl *pImpl = RTL_DIGEST_CREATE(DigestMD5_Impl); if (pImpl) { pImpl->m_digest = MD5; @@ -1107,8 +1105,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA( rtlDigest SAL_CALL rtl_digest_createSHA() SAL_THROW_EXTERN_C() { - DigestSHA_Impl *pImpl = nullptr; - pImpl = RTL_DIGEST_CREATE(DigestSHA_Impl); + DigestSHA_Impl *pImpl = RTL_DIGEST_CREATE(DigestSHA_Impl); if (pImpl) { pImpl->m_digest = SHA_0; @@ -1267,8 +1264,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA1( rtlDigest SAL_CALL rtl_digest_createSHA1() SAL_THROW_EXTERN_C() { - DigestSHA_Impl *pImpl = nullptr; - pImpl = RTL_DIGEST_CREATE(DigestSHA_Impl); + DigestSHA_Impl *pImpl = RTL_DIGEST_CREATE(DigestSHA_Impl); if (pImpl) { pImpl->m_digest = SHA_1; @@ -1482,8 +1478,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_MD5( rtlDigest SAL_CALL rtl_digest_createHMAC_MD5() SAL_THROW_EXTERN_C() { - DigestHMAC_MD5_Impl *pImpl = nullptr; - pImpl = RTL_DIGEST_CREATE(DigestHMAC_MD5_Impl); + DigestHMAC_MD5_Impl *pImpl = RTL_DIGEST_CREATE(DigestHMAC_MD5_Impl); if (pImpl) { pImpl->m_digest = HMAC_MD5; @@ -1678,8 +1673,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_SHA1( rtlDigest SAL_CALL rtl_digest_createHMAC_SHA1() SAL_THROW_EXTERN_C() { - DigestHMAC_SHA1_Impl *pImpl = nullptr; - pImpl = RTL_DIGEST_CREATE(DigestHMAC_SHA1_Impl); + DigestHMAC_SHA1_Impl *pImpl = RTL_DIGEST_CREATE(DigestHMAC_SHA1_Impl); if (pImpl) { pImpl->m_digest = HMAC_SHA1; -- cgit