summaryrefslogtreecommitdiff
path: root/sal/systools/win32/kill/kill.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/systools/win32/kill/kill.cxx')
-rw-r--r--sal/systools/win32/kill/kill.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sal/systools/win32/kill/kill.cxx b/sal/systools/win32/kill/kill.cxx
index f10e5e5614f4..56a464c6448b 100644
--- a/sal/systools/win32/kill/kill.cxx
+++ b/sal/systools/win32/kill/kill.cxx
@@ -68,9 +68,6 @@ static inline bool IsValidHandle( HANDLE handle )
return INVALID_HANDLE_VALUE != handle && NULL != handle;
}
-
-#define elementsof( a ) (sizeof(a) / sizeof( (a)[0] ))
-
/////////////////////////////////////////////////////////////////////////////
// Retrieves function adress in another process
/////////////////////////////////////////////////////////////////////////////
@@ -91,7 +88,7 @@ FARPROC WINAPI GetProcAddressEx( HANDLE hProcess, HMODULE hModule, LPCSTR lpProc
FARPROC lpfnRemoteProcAddress = NULL;
TCHAR szBaseName[MAX_PATH];
- if ( GetModuleBaseName( GetCurrentProcess(), hModule, szBaseName, elementsof(szBaseName) ) )
+ if ( GetModuleBaseName( GetCurrentProcess(), hModule, szBaseName, SAL_N_ELEMENTS(szBaseName) ) )
{
HMODULE ahModules[MAX_MODULES];
DWORD cbNeeded = 0;
@@ -105,7 +102,7 @@ FARPROC WINAPI GetProcAddressEx( HANDLE hProcess, HMODULE hModule, LPCSTR lpProc
TCHAR szRemoteBaseName[MAX_PATH];
if ( GetModuleBaseName(
- hProcess, ahModules[n], szRemoteBaseName, elementsof(szRemoteBaseName) ) &&
+ hProcess, ahModules[n], szRemoteBaseName, SAL_N_ELEMENTS(szRemoteBaseName) ) &&
0 == lstrcmpi( szRemoteBaseName, szBaseName )
)
{
@@ -257,7 +254,7 @@ static void ParseCommandArgs( LPDWORD lpProcesses, LPDWORD lpdwNumProcesses, int
SIG_ENTRY( KILL )
};
- const int NumSupportedSignals = elementsof(SupportedSignals);
+ const int NumSupportedSignals = SAL_N_ELEMENTS(SupportedSignals);
DWORD dwMaxProcesses = *lpdwNumProcesses;
int argc = __argc;
@@ -402,7 +399,7 @@ void OutputSystemMessage( DWORD dwErrorCode )
int _tmain()
{
DWORD dwProcessIds[1024];
- DWORD nProcesses = elementsof(dwProcessIds);
+ DWORD nProcesses = SAL_N_ELEMENTS(dwProcessIds);
int sig = SIGTERM;