From 2e2d736ccbb21daae91603732c87d5375ede1b47 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 6 Nov 2018 13:27:23 +0200 Subject: loplugin:collapseif in framework..sal Change-Id: I3068b18f5cff024a48a8f8c68d69cadad30fe4d5 Reviewed-on: https://gerrit.libreoffice.org/62953 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sal/rtl/random.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sal') diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx index 224a345a3094..836d30889b80 100644 --- a/sal/rtl/random.cxx +++ b/sal/rtl/random.cxx @@ -294,11 +294,8 @@ rtlRandomError SAL_CALL rtl_random_getBytes ( if (pImpl->m_hDigest || !osl_get_system_random_data(static_cast< char* >(Buffer), Bytes)) { - if (!pImpl->m_hDigest) - { - if (!initPool (pImpl)) - return rtl_Random_E_Unknown; - } + if (!pImpl->m_hDigest && !initPool(pImpl)) + return rtl_Random_E_Unknown; readPool(pImpl, pBuffer, Bytes); } return rtl_Random_E_None; -- cgit