summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/wintools/makecab/makecab.c2
-rw-r--r--setup_native/source/win32/wintools/msidb/msidb.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/setup_native/source/win32/wintools/makecab/makecab.c b/setup_native/source/win32/wintools/makecab/makecab.c
index 4acdc9fc315d..a5c7acda1a8e 100644
--- a/setup_native/source/win32/wintools/makecab/makecab.c
+++ b/setup_native/source/win32/wintools/makecab/makecab.c
@@ -61,7 +61,7 @@ void cabLogErr(PERF erf, char * msg)
if (erf->erfOper >= 0)
{
- if (erf->erfOper < (sizeof(FCI_ERRS)/sizeof(FCI_ERRS[0])))
+ if (erf->erfOper < SAL_N_ELEMENTS(FCI_ERRS))
cabLog(CABLOG_ERR, "%s: %s", msg, FCI_ERRS[erf->erfOper]);
else
cabLog(CABLOG_ERR, "%s: Unknown error", msg);
diff --git a/setup_native/source/win32/wintools/msidb/msidb.c b/setup_native/source/win32/wintools/msidb/msidb.c
index 733fe58b1205..2c100975fe7b 100644
--- a/setup_native/source/win32/wintools/msidb/msidb.c
+++ b/setup_native/source/win32/wintools/msidb/msidb.c
@@ -441,7 +441,7 @@ static BOOL msidbExportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[])
MSIHANDLE dbhandle, tableListView, rec;
LPWSTR tableFile = 0;
WCHAR tableName[MAX_TABLE_NAME];
- DWORD size = sizeof(tableName) / sizeof(tableName[0]);
+ DWORD size = SAL_N_ELEMENTS(tableName);
int i = 0;
r = MsiOpenDatabaseW(dbfile, (LPCWSTR) MSIDBOPEN_READONLY, &dbhandle);
@@ -456,7 +456,7 @@ static BOOL msidbExportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[])
while (r == ERROR_SUCCESS)
{
- size = sizeof(tableName) / sizeof(tableName[0]);
+ size = SAL_N_ELEMENTS(tableName);
r = MsiRecordGetStringW(rec, 1, tableName, &size);
if (r == ERROR_SUCCESS)
{