summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorKenneth Venken <kenneth.venken@gmail.com>2010-10-16 20:56:57 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-16 20:56:57 +0100
commit0fd4fdfa8e6536fb27f43dcd09766dcf9c7dce78 (patch)
treec6757fa63e00e799f48e0ec7d53098a3f75417d6 /extensions
parent6fa94490b3cf37b4b4313d58d7cc06d279ecad72 (diff)
some patches that replace sizeof(a)/sizeof(a[0]) with SAL_N_ELEMENTS(a)
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/scanner/sane.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 35c4ab829..717cf4c61 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -39,6 +39,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sal/config.h>
+#include <sal/macros.h>
#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
#include <stdarg.h>
@@ -989,7 +990,7 @@ String Sane::GetOptionUnitName( int n )
String aText;
SANE_Unit nUnit = mppOptions[n]->unit;
size_t nUnitAsSize = (size_t)nUnit;
- if( nUnitAsSize > sizeof( ppUnits )/sizeof( ppUnits[0] ) )
+ if( nUnitAsSize > SAL_N_ELEMENTS( ppUnits ) )
aText = String::CreateFromAscii( "[unknown units]" );
else
aText = String( ppUnits[ nUnit ], gsl_getSystemTextEncoding() );