From e2b287c6e5d948616b3dbd3a0366cda62ba3f1ca Mon Sep 17 00:00:00 2001 From: Kenneth Venken Date: Mon, 18 Oct 2010 12:30:17 +0200 Subject: [PATCH] replace sizeof(foo)/sizeof(foo[0]) by SAL_N_ELEMENTS --- test/source/cpp/officeconnection.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/source/cpp/officeconnection.cxx b/test/source/cpp/officeconnection.cxx index d8198a004a92..fd71df69fef0 100644 --- a/test/source/cpp/officeconnection.cxx +++ b/test/source/cpp/officeconnection.cxx @@ -40,6 +40,7 @@ #include "osl/process.h" #include "osl/time.h" #include "sal/types.h" +#include #include "test/getargument.hxx" #include "test/officeconnection.hxx" #include "test/toabsolutefileurl.hxx" @@ -109,7 +110,7 @@ void OfficeConnection::setUp() { osl_executeProcess( toAbsoluteFileUrl( argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData, - args, sizeof args / sizeof args[0], 0, 0, 0, envs, + args, SAL_N_ELEMENTS( args ), 0, 0, 0, envs, envs == 0 ? 0 : 1, &process_)); } else if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("connect:"))) { desc = argSoffice.copy(RTL_CONSTASCII_LENGTH("connect:"));