diff options
author | Kenneth Venken <kenneth.venken@gmail.com> | 2010-10-16 20:56:57 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2010-10-16 20:56:57 +0100 |
commit | 9f8917600d8b8815963d94b15908e3db07612cd7 (patch) | |
tree | 84cfefe86818b67b3b6e7272e10426d11c8e88d4 /mysqlc | |
parent | 67d9071a257fa1bee28445a0e4c7fcbd781d0edc (diff) |
some patches that replace sizeof(a)/sizeof(a[0]) with SAL_N_ELEMENTS(a)
Diffstat (limited to 'mysqlc')
-rw-r--r-- | mysqlc/source/mysqlc_databasemetadata.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx index 03ec4b055e3f..a0ecf2ab854c 100644 --- a/mysqlc/source/mysqlc_databasemetadata.cxx +++ b/mysqlc/source/mysqlc_databasemetadata.cxx @@ -62,6 +62,7 @@ using mysqlc_sdbc_driver::getStringFromAny; #include <cppconn/statement.h> #include <cppconn/prepared_statement.h> #include <postextstl.h> +#include <sal/macros.h> static ext_std::string wild("%"); @@ -2106,7 +2107,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges( "ALTER", "DELETE", "DROP", "INDEX", "INSERT", "LOCK TABLES", "SELECT", "UPDATE" }; Any userName; userName <<= getUserName(); - for (size_t i = 0; i < sizeof( allPrivileges ) / sizeof( allPrivileges[0]); ++i) { + for (size_t i = 0; i < SAL_N_ELEMENTS( allPrivileges ); ++i) { std::vector< Any > aRow; aRow.push_back(makeAny( sal_Int32( i ) )); aRow.push_back(catalog); // TABLE_CAT |