diff --git a/src/iscguard/cntl_guard.cpp b/src/iscguard/cntl_guard.cpp index 7afcbe8953..cee926e05a 100644 --- a/src/iscguard/cntl_guard.cpp +++ b/src/iscguard/cntl_guard.cpp @@ -164,7 +164,7 @@ void CNTL_shutdown_service(const TEXT* message) * **************************************/ const char* strings[2]; - char buffer[256]; + char buffer[BUFFER_SMALL]; sprintf(buffer, "%s error: %lu", service_name, GetLastError()); diff --git a/src/jrd/os/win32/fbsyslog.cpp b/src/jrd/os/win32/fbsyslog.cpp index 1635db9dcf..2df6e56be7 100644 --- a/src/jrd/os/win32/fbsyslog.cpp +++ b/src/jrd/os/win32/fbsyslog.cpp @@ -87,16 +87,16 @@ class SyslogAccess iSyslogAccess; namespace Firebird { void Syslog::Record(Severity level, Firebird::string Msg) { - WORD wType = EVENTLOG_ERROR_TYPE; - switch (level) { - case Warning: - wType = EVENTLOG_INFORMATION_TYPE; - break; - case Error: - default: - wType = EVENTLOG_ERROR_TYPE; - break; + WORD wType = EVENTLOG_ERROR_TYPE; + switch (level) { + case Warning: + wType = EVENTLOG_INFORMATION_TYPE; + break; + case Error: + default: + wType = EVENTLOG_ERROR_TYPE; + break; + } + iSyslogAccess.Record(wType, Msg); } - iSyslogAccess.Record(wType, Msg); -} } // namespace Firebird diff --git a/src/remote/os/win32/cntl.cpp b/src/remote/os/win32/cntl.cpp index 282c05dada..c4e3226d23 100644 --- a/src/remote/os/win32/cntl.cpp +++ b/src/remote/os/win32/cntl.cpp @@ -234,10 +234,10 @@ void CNTL_shutdown_service( const TEXT* message) **************************************/ const char* strings[2]; - char buffer[256]; - sprintf(buffer, "%s error: %lu", "Firebird Server", GetLastError()); + char buffer[BUFFER_SMALL]; + sprintf(buffer, "%s error: %lu", REMOTE_SERVICE, GetLastError()); - HANDLE event_source = RegisterEventSource(NULL, "Firebird Server"); + HANDLE event_source = RegisterEventSource(NULL, REMOTE_SERVICE); if (event_source) { strings[0] = buffer; strings[1] = message;