Commit cd3c2fdb authored by Max Kellermann's avatar Max Kellermann

Win32Main: make variables more local

parent 5cbc319e
......@@ -122,15 +122,13 @@ console_handler(DWORD event)
int win32_main(int argc, char *argv[])
{
DWORD error_code;
service_argc = argc;
service_argv = argv;
if (StartServiceCtrlDispatcher(service_registry))
return 0; /* run as service successefully */
error_code = GetLastError();
const DWORD error_code = GetLastError();
if (error_code == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
/* running as console app */
running.store(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment