Author: markt Date: Mon Nov 28 21:04:06 2016 New Revision: 1771815 URL: http://svn.apache.org/viewvc?rev=1771815&view=rev Log: Fix regression in r1771804
Modified: commons/proper/daemon/trunk/src/native/windows/src/service.c Modified: commons/proper/daemon/trunk/src/native/windows/src/service.c URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/service.c?rev=1771815&r1=1771814&r2=1771815&view=diff ============================================================================== --- commons/proper/daemon/trunk/src/native/windows/src/service.c (original) +++ commons/proper/daemon/trunk/src/native/windows/src/service.c Mon Nov 28 21:04:06 2016 @@ -147,7 +147,7 @@ apxServiceOpen(APXHANDLE hService, LPCWS lpService->stServiceEntry.szObjectName[0] = L'\0'; } if (!QueryServiceConfigW(lpService->hService, NULL, 0, &dwNeeded)) { - if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { // This is expected. The call is expected to fail with the required // buffer size set in dwNeeded. // Clear the last error to prevent it being logged if a genuine @@ -157,7 +157,6 @@ apxServiceOpen(APXHANDLE hService, LPCWS apxLogWrite(APXLOG_MARK_SYSERR); } } - /* TODO: Check GetLastError ERROR_INSUFFICIENT_BUFFER */ lpService->stServiceEntry.lpConfig = (LPQUERY_SERVICE_CONFIGW)apxPoolAlloc(hService->hPool, dwNeeded); return QueryServiceConfigW(lpService->hService,