\r
/* Get a snapshot of all threads in the system. */\r
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);\r
- if (! snapshot) {\r
+ if (snapshot == INVALID_HANDLE_VALUE) {\r
log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_CREATETOOLHELP32SNAPSHOT_THREAD_FAILED, k->name, error_string(GetLastError()), 0);\r
return 0;\r
}\r
\r
/* Get a snapshot of all processes in the system. */\r
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);\r
- if (! snapshot) {\r
+ if (snapshot == INVALID_HANDLE_VALUE) {\r
log_event(EVENTLOG_ERROR_TYPE, NSSM_EVENT_CREATETOOLHELP32SNAPSHOT_PROCESS_FAILED, k->name, error_string(GetLastError()), 0);\r
return;\r
}\r