diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-01-14 17:25:20 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-01-14 17:25:20 +0000 |
commit | 53ff4acbf341b20b772bdd87d06fed30e0d1b28a (patch) | |
tree | af2481bf55255c92f40254b6350cf43847ffa3dd /plugins/Variables/src/enumprocs.cpp | |
parent | 127744a38a4bad16aa1cbf20c3824345a9644c5a (diff) |
minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@7647 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src/enumprocs.cpp')
-rw-r--r-- | plugins/Variables/src/enumprocs.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Variables/src/enumprocs.cpp b/plugins/Variables/src/enumprocs.cpp index 7ae68ed978..e35accfd0e 100644 --- a/plugins/Variables/src/enumprocs.cpp +++ b/plugins/Variables/src/enumprocs.cpp @@ -44,26 +44,24 @@ typedef struct { BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam)
{
- OSVERSIONINFO osver;
- HANDLE hSnapShot = NULL;
LPDWORD lpdwPIDs = NULL;
- PROCESSENTRY32 procentry;
- BOOL bFlag;
// Retrieve the OS version
+ OSVERSIONINFO osver;
osver.dwOSVersionInfoSize = sizeof(osver);
if (!GetVersionEx(&osver))
return FALSE;
if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS || (osver.dwPlatformId == VER_PLATFORM_WIN32_NT && osver.dwMajorVersion > 4)) {
// Get a handle to a Toolhelp snapshot of all processes.
- hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+ HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnapShot == INVALID_HANDLE_VALUE)
return FALSE;
// Get the first process' information.
+ PROCESSENTRY32 procentry;
procentry.dwSize = sizeof(PROCESSENTRY32);
- bFlag = Process32First(hSnapShot, &procentry);
+ BOOL bFlag = Process32First(hSnapShot, &procentry);
// While there are processes, keep looping.
while (bFlag) {
|