summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-14 11:31:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-15 08:24:33 +0200
commitec8c98f59869bee0e327d32f39480a0e4b1330bc (patch)
treeee68d29cd51c60a8a939fd454955410e66e3b66c /desktop
parent11503e99be09b4e8faa465559fbdacb06e8896cc (diff)
use more SAL_N_ELEMENTS part 3
Change-Id: I82e366fefd2e31928b99840fe76649cc3521e623 Reviewed-on: https://gerrit.libreoffice.org/38789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/dp_misc.h2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx2
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx6
3 files changed, 3 insertions, 7 deletions
diff --git a/desktop/inc/dp_misc.h b/desktop/inc/dp_misc.h
index 365bff77338a..154a4de59543 100644
--- a/desktop/inc/dp_misc.h
+++ b/desktop/inc/dp_misc.h
@@ -32,8 +32,6 @@
#include <com/sun/star/awt/XWindow.hpp>
#include "dp_misc_api.hxx"
-#define ARLEN(x) (sizeof (x) / sizeof *(x))
-
namespace dp_misc {
const sal_Char CR = 0x0d;
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 2083075a608e..3655a4c05c13 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -428,7 +428,7 @@ OUString generateRandomPipeId()
throw RuntimeException( "cannot create random pool!?", nullptr );
sal_uInt8 bytes[ 32 ];
if (rtl_random_getBytes(
- s_hPool, bytes, ARLEN(bytes) ) != rtl_Random_E_None) {
+ s_hPool, bytes, SAL_N_ELEMENTS(bytes) ) != rtl_Random_E_None) {
throw RuntimeException( "random pool error!?", nullptr );
}
OUStringBuffer buf;
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 2c40f9e54798..cc060c4f0b31 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1511,10 +1511,8 @@ void BackendImpl::PackageImpl::scanLegacyBundle(
if (title.endsWithIgnoreAsciiCase("skip_registration") )
skip_registration = true;
- OUString ar [] = { OUString("Title"), OUString("IsFolder") };
- Reference<sdbc::XResultSet> xResultSet(
- ucbContent.createCursor(
- Sequence<OUString>( ar, ARLEN(ar) ) ) );
+ Sequence<OUString> ar { OUString("Title"), OUString("IsFolder") };
+ Reference<sdbc::XResultSet> xResultSet( ucbContent.createCursor( ar ) );
while (xResultSet->next())
{
checkAborted( abortChannel );