Skip to content

Commit 985d919

Browse files
adityamandaleekacaptainsafia
authored andcommitted
Minor improvements.
1 parent 8fb7089 commit 985d919

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/Servers/IIS/AspNetCoreModuleV2/CommonLib/debugutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ std::wstring
114114
GetModuleName()
115115
{
116116
WCHAR path[MAX_PATH];
117-
LOG_LAST_ERROR_IF(!GetModuleFileName(g_hModule, path, MAX_PATH));
117+
LOG_LAST_ERROR_IF(!GetModuleFileName(g_hModule, path, _countof(path)));
118118
return path;
119119
}
120120

src/Servers/IIS/AspNetCoreModuleV2/DefaultRules.ruleset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<Rule Id="C26475" Action="Error" />
8181
<Rule Id="C26476" Action="None" /> <!-- Expression/symbol 'name' uses a naked union 'union' with multiple type pointers: Use variant instead -->
8282
<Rule Id="C26477" Action="Error" />
83+
<Rule Id="C26478" Action="Error" />
8384
<Rule Id="C26481" Action="None" /> <!-- Don't use pointer arithmetic. Use span instead -->
8485
<Rule Id="C26482" Action="None" /> <!-- Only index into arrays using constant expressions. -->
8586
<Rule Id="C26483" Action="Error" />

src/Servers/IIS/AspNetCoreModuleV2/IISLib/stringa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ Return Value:
470470

471471
HRESULT hr = SafeVsnprintf(pszFormatString, argsList);
472472

473-
#pragma warning(suppress: 26477)
473+
#pragma warning(suppress: 26477) // va_end uses 0
474474
va_end( argsList );
475475
return hr;
476476
}

src/Servers/IIS/AspNetCoreModuleV2/OutOfProcessRequestHandler/winhttphelper.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ WINHTTP_HELPER::sm_pfnWinHttpWebSocketQueryCloseStatus;
2121

2222
//static
2323
HRESULT
24-
WINHTTP_HELPER::StaticInitialize(
25-
VOID
26-
)
24+
WINHTTP_HELPER::StaticInitialize()
2725
{
2826
//
2927
// Initialize the function pointers for WinHttp Websocket API's.

0 commit comments

Comments
 (0)