From ec8c98f59869bee0e327d32f39480a0e4b1330bc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Jun 2017 11:31:15 +0200 Subject: use more SAL_N_ELEMENTS part 3 Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623 Reviewed-on: https://gerrit.libreoffice.org/38789 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- cppuhelper/source/bootstrap.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index 0d64c56e9e62..55a0d244b724 100644 --- a/cppuhelper/source/bootstrap.cxx +++ b/cppuhelper/source/bootstrap.cxx @@ -42,8 +42,6 @@ #include "macro_expander.hxx" -#define ARLEN(x) sizeof (x) / sizeof *(x) - using namespace ::osl; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -138,7 +136,7 @@ Reference< XComponentContext > SAL_CALL bootstrap() if ( hPool == nullptr ) throw BootstrapException( "cannot create random pool!" ); sal_uInt8 bytes[ 16 ]; - if ( rtl_random_getBytes( hPool, bytes, ARLEN( bytes ) ) + if ( rtl_random_getBytes( hPool, bytes, SAL_N_ELEMENTS( bytes ) ) != rtl_Random_E_None ) throw BootstrapException( "random pool error!" ); rtl_random_destroyPool( hPool ); @@ -167,7 +165,7 @@ Reference< XComponentContext > SAL_CALL bootstrap() // start office process oslProcess hProcess = nullptr; oslProcessError rc = osl_executeProcess( - OUString(path + "soffice").pData, ar_args, ARLEN( ar_args ), + OUString(path + "soffice").pData, ar_args, SAL_N_ELEMENTS( ar_args ), osl_Process_DETACHED, sec.getHandle(), nullptr, // => current working dir -- cgit