[NETSTAT] Really fix the build.

This commit is contained in:
Hermès Bélusca-Maïto 2019-06-20 21:15:12 +02:00
parent dda5ec44b0
commit 84c20018e6
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 11 additions and 14 deletions

View file

@ -54,11 +54,11 @@ PCWSTR TcpState[] = {
*/ */
VOID DoFormatMessage(DWORD ErrorCode) VOID DoFormatMessage(DWORD ErrorCode)
{ {
if (dwError == ERROR_SUCCESS) if (ErrorCode == ERROR_SUCCESS)
return; return;
ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM, ConMsgPuts(StdErr, FORMAT_MESSAGE_FROM_SYSTEM,
NULL, dwError, LANG_USER_DEFAULT); NULL, ErrorCode, LANG_USER_DEFAULT);
} }
/* /*
@ -153,7 +153,7 @@ BOOL ParseCmdline(int argc, wchar_t* argv[])
/* /*
* Display table header * Display table header
*/ */
VOID DisplayTableHeader() VOID DisplayTableHeader(VOID)
{ {
ConResPuts(StdOut, IDS_DISPLAY_THEADER); ConResPuts(StdOut, IDS_DISPLAY_THEADER);
if (bDoShowProcessId) if (bDoShowProcessId)
@ -162,11 +162,10 @@ VOID DisplayTableHeader()
ConPuts(StdOut, L"\n"); ConPuts(StdOut, L"\n");
} }
/* /*
* Simulate Microsofts netstat utility output * Simulate Microsofts netstat utility output
*/ */
BOOL DisplayOutput() BOOL DisplayOutput(VOID)
{ {
if (bNoOptions) if (bNoOptions)
{ {
@ -247,7 +246,7 @@ BOOL DisplayOutput()
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
VOID ShowIpStatistics() VOID ShowIpStatistics(VOID)
{ {
PMIB_IPSTATS pIpStats; PMIB_IPSTATS pIpStats;
DWORD dwRetVal; DWORD dwRetVal;
@ -283,7 +282,7 @@ VOID ShowIpStatistics()
HeapFree(GetProcessHeap(), 0, pIpStats); HeapFree(GetProcessHeap(), 0, pIpStats);
} }
VOID ShowIcmpStatistics() VOID ShowIcmpStatistics(VOID)
{ {
PMIB_ICMP pIcmpStats; PMIB_ICMP pIcmpStats;
DWORD dwRetVal; DWORD dwRetVal;
@ -330,7 +329,7 @@ VOID ShowIcmpStatistics()
} }
VOID ShowTcpStatistics() VOID ShowTcpStatistics(VOID)
{ {
PMIB_TCPSTATS pTcpStats; PMIB_TCPSTATS pTcpStats;
DWORD dwRetVal; DWORD dwRetVal;
@ -357,7 +356,7 @@ VOID ShowTcpStatistics()
HeapFree(GetProcessHeap(), 0, pTcpStats); HeapFree(GetProcessHeap(), 0, pTcpStats);
} }
VOID ShowUdpStatistics() VOID ShowUdpStatistics(VOID)
{ {
PMIB_UDPSTATS pUdpStats; PMIB_UDPSTATS pUdpStats;
DWORD dwRetVal; DWORD dwRetVal;
@ -380,7 +379,7 @@ VOID ShowUdpStatistics()
HeapFree(GetProcessHeap(), 0, pUdpStats); HeapFree(GetProcessHeap(), 0, pUdpStats);
} }
VOID ShowEthernetStatistics() VOID ShowEthernetStatistics(VOID)
{ {
PMIB_IFTABLE pIfTable; PMIB_IFTABLE pIfTable;
DWORD dwSize = 0; DWORD dwSize = 0;
@ -418,7 +417,7 @@ VOID ShowEthernetStatistics()
HeapFree(GetProcessHeap(), 0, pIfTable); HeapFree(GetProcessHeap(), 0, pIfTable);
} }
VOID ShowTcpTable() VOID ShowTcpTable(VOID)
{ {
PMIB_TCPTABLE_OWNER_PID tcpTable; PMIB_TCPTABLE_OWNER_PID tcpTable;
DWORD error, dwSize; DWORD error, dwSize;
@ -490,7 +489,7 @@ VOID ShowTcpTable()
HeapFree(GetProcessHeap(), 0, tcpTable); HeapFree(GetProcessHeap(), 0, tcpTable);
} }
VOID ShowUdpTable() VOID ShowUdpTable(VOID)
{ {
PMIB_UDPTABLE_OWNER_PID udpTable; PMIB_UDPTABLE_OWNER_PID udpTable;
DWORD error, dwSize; DWORD error, dwSize;

View file

@ -44,8 +44,6 @@ typedef struct {
} MIB_UDPEXTABLE, *PMIB_UDPEXTABLE; } MIB_UDPEXTABLE, *PMIB_UDPEXTABLE;
/* function declarations */ /* function declarations */
BOOL DisplayOutput(VOID);
DWORD DoFormatMessage(DWORD ErrorCode);
VOID ShowIpStatistics(VOID); VOID ShowIpStatistics(VOID);
VOID ShowIcmpStatistics(VOID); VOID ShowIcmpStatistics(VOID);
VOID ShowTcpStatistics(VOID); VOID ShowTcpStatistics(VOID);