summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorKenneth Venken <kenneth.venken@gmail.com>2010-10-15 18:15:35 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-15 18:15:35 +0100
commit394235bba1f7c474c9655f929f4fe27a550aba45 (patch)
tree266bd52b9f0b82dc5b21c4c7a9d829fb1ff87003 /setup_native
parent7d4ffef8b74cd9ac2959006bac8d5c582b313e61 (diff)
SAL_N_ELEMENTS changes for components
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx2
-rw-r--r--setup_native/source/win32/customactions/sellang/sellang.cxx2
-rw-r--r--setup_native/source/win32/stwrapper/stwrapper.cxx14
3 files changed, 7 insertions, 11 deletions
diff --git a/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx b/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx
index ffbbafc9a68d..e3f930ccfcbd 100644
--- a/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx
+++ b/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx
@@ -43,8 +43,6 @@
#include <memory>
#include <string>
-#define ELEMENTS_OF_ARRAY(a) (sizeof(a)/sizeof(a[0]))
-
void DetermineWordPreselectionState(MSIHANDLE handle)
{
if (query_preselect_registration_for_ms_application(handle, MSWORD))
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx
index 3b52d7ee0373..ecae30371082 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -185,7 +185,7 @@ enum_ui_lang_proc (LPTSTR language, LONG_PTR /* unused_lParam */)
return TRUE;
ui_langs[num_ui_langs] = langid_to_string((LANGID) langid, NULL);
num_ui_langs++;
- if (num_ui_langs == sizeof(ui_langs) / sizeof(ui_langs[0]))
+ if (num_ui_langs == SAL_N_ELEMENTS(ui_langs) )
return FALSE;
return TRUE;
}
diff --git a/setup_native/source/win32/stwrapper/stwrapper.cxx b/setup_native/source/win32/stwrapper/stwrapper.cxx
index d2c72c6422d4..0a12b3a80f61 100644
--- a/setup_native/source/win32/stwrapper/stwrapper.cxx
+++ b/setup_native/source/win32/stwrapper/stwrapper.cxx
@@ -13,8 +13,6 @@
#include <stdio.h>
-#define elementsof(buf) (sizeof(buf) / sizeof(buf[0]))
-
enum PathResult
{
PATHRESULT_OK,
@@ -281,7 +279,7 @@ int WINAPI _tWinMain( HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR, int )
{
if ( i < nArgs )
++i;
- SafeCopy( szInstanceURN, lpArgs[i], elementsof( szInstanceURN ));
+ SafeCopy( szInstanceURN, lpArgs[i], SAL_N_ELEMENTS( szInstanceURN ));
break;
}
@@ -289,35 +287,35 @@ int WINAPI _tWinMain( HINSTANCE /*hInstance*/, HINSTANCE, LPTSTR, int )
{
if ( i < nArgs )
++i;
- SafeCopy( szTargetURN, lpArgs[i], elementsof( szTargetURN ));
+ SafeCopy( szTargetURN, lpArgs[i], SAL_N_ELEMENTS( szTargetURN ));
break;
}
case 'p':
{
if ( i < nArgs )
++i;
- SafeCopy( szProductName, lpArgs[i], elementsof( szProductName ));
+ SafeCopy( szProductName, lpArgs[i], SAL_N_ELEMENTS( szProductName ));
break;
}
case 'e':
{
if ( i < nArgs )
++i;
- SafeCopy( szProductVersion, lpArgs[i], elementsof( szProductVersion ));
+ SafeCopy( szProductVersion, lpArgs[i], SAL_N_ELEMENTS( szProductVersion ));
break;
}
case 'P':
{
if ( i < nArgs )
++i;
- SafeCopy( szParentProductName, lpArgs[i], elementsof( szParentProductName ));
+ SafeCopy( szParentProductName, lpArgs[i], SAL_N_ELEMENTS( szParentProductName ));
break;
}
case 'S':
{
if ( i < nArgs )
++i;
- SafeCopy( szProductSource, lpArgs[i], elementsof( szProductSource ));
+ SafeCopy( szProductSource, lpArgs[i], SAL_N_ELEMENTS( szProductSource ));
break;
}