Author: cwittich
Date: Tue Feb 26 17:04:35 2008
New Revision: 32492
URL:
http://svn.reactos.org/svn/reactos?rev=32492&view=rev
Log:
only get the last error code when it is needed
Modified:
trunk/reactos/base/services/tcpsvcs/tcpsvcs.c
Modified: trunk/reactos/base/services/tcpsvcs/tcpsvcs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tcpsvcs/tcps…
==============================================================================
--- trunk/reactos/base/services/tcpsvcs/tcpsvcs.c (original)
+++ trunk/reactos/base/services/tcpsvcs/tcpsvcs.c Tue Feb 26 17:04:35 2008
@@ -37,7 +37,7 @@
{
#ifdef DEBUG
DWORD eMsgLen;
- DWORD ErrNum = GetLastError();
+ DWORD ErrNum;
LPTSTR lpvSysMsg;
TCHAR MessageBuffer[512];
FILE *hLogFile = NULL;
@@ -47,6 +47,7 @@
if (PrintErrorMsg)
{
+ ErrNum = GetLastError();
eMsgLen = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
ErrNum,