Win32Main: make variables more local

This commit is contained in:
Max Kellermann 2014-12-05 00:25:48 +01:00
parent 5cbc319e96
commit cd3c2fdb49

View File

@ -122,15 +122,13 @@ console_handler(DWORD event)
int win32_main(int argc, char *argv[]) int win32_main(int argc, char *argv[])
{ {
DWORD error_code;
service_argc = argc; service_argc = argc;
service_argv = argv; service_argv = argv;
if (StartServiceCtrlDispatcher(service_registry)) if (StartServiceCtrlDispatcher(service_registry))
return 0; /* run as service successefully */ return 0; /* run as service successefully */
error_code = GetLastError(); const DWORD error_code = GetLastError();
if (error_code == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { if (error_code == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) {
/* running as console app */ /* running as console app */
running.store(false); running.store(false);