summaryrefslogtreecommitdiff
path: root/extensions/source/update/check
diff options
context:
space:
mode:
authorKenneth Venken <kenneth.venken@gmail.com>2010-12-03 13:59:47 +0000
committerNoel Power <noel.power@novell.com>2010-12-03 13:59:47 +0000
commit39fc2df3c1d8e8bc8b689e2d21c193bc4886bf8c (patch)
treec663b430fd156eab527bbc3efa3def2b85b8ede2 /extensions/source/update/check
parent0bdef7cec695042a2259c327fc4ea84c74babd0f (diff)
more Sal n elements
Diffstat (limited to 'extensions/source/update/check')
-rw-r--r--extensions/source/update/check/updatecheck.cxx5
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx3
2 files changed, 5 insertions, 3 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index ccfcda6157cb..5e42f7f0fa00 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -49,6 +49,7 @@
#include <osl/process.h>
#include <osl/module.hxx>
#include <osl/file.hxx>
+#include <sal/macros.h>
#ifdef WNT
#ifdef _MSC_VER
@@ -577,7 +578,7 @@ UpdateCheckThread::run()
// Increase next by 15, 60, .. minutes
static const sal_Int32 nRetryInterval[] = { 900, 3600, 14400, 86400 };
- if( n < sizeof(nRetryInterval) / sizeof(sal_Int32) )
+ if( n < SAL_N_ELEMENTS(nRetryInterval) )
++n;
tv.Seconds = nRetryInterval[n-1];
@@ -689,7 +690,7 @@ DownloadThread::run()
// Increase next by 1, 5, 15, 60, .. minutes
static const sal_Int16 nRetryInterval[] = { 60, 300, 900, 3600 };
- if( n < sizeof(nRetryInterval) / sizeof(sal_Int16) )
+ if( n < SAL_N_ELEMENTS(nRetryInterval) )
++n;
tv.Seconds = nRetryInterval[n-1];
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index f897eb668b3e..854638c26e52 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -39,6 +39,7 @@
#include <osl/security.hxx>
#include <osl/time.h>
#include <osl/file.hxx>
+#include <sal/macros.h>
#ifdef WNT
#ifdef _MSC_VER
@@ -91,7 +92,7 @@ static const sal_Char * const aUpdateEntryProperties[] = {
OLD_VERSION
};
-static const sal_uInt32 nUpdateEntryProperties = sizeof(aUpdateEntryProperties) / sizeof(sal_Char *);
+static const sal_uInt32 nUpdateEntryProperties = SAL_N_ELEMENTS(aUpdateEntryProperties);
//------------------------------------------------------------------------------