mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 17:31:31 +00:00
[NETSTAT] Optimize a bit (#5405)
in netstat.c 100% of the calls to DisplayTableHeader(); have in the exact line beforehand a call to ConResPuts(StdOut, IDS_ACTIVE_CONNECT); So let's fuse them. Also fix a superfluous space in the *.rc files before it will get duplicated a thousand times.
This commit is contained in:
parent
3e23cdf9ee
commit
8ef47d2e5e
|
@ -63,6 +63,7 @@ VOID DoFormatMessage(DWORD ErrorCode)
|
||||||
*/
|
*/
|
||||||
VOID DisplayTableHeader(VOID)
|
VOID DisplayTableHeader(VOID)
|
||||||
{
|
{
|
||||||
|
ConResPuts(StdOut, IDS_ACTIVE_CONNECT);
|
||||||
ConResPuts(StdOut, IDS_DISPLAY_THEADER);
|
ConResPuts(StdOut, IDS_DISPLAY_THEADER);
|
||||||
if (bDoShowProcessId)
|
if (bDoShowProcessId)
|
||||||
ConResPuts(StdOut, IDS_DISPLAY_PROCESS);
|
ConResPuts(StdOut, IDS_DISPLAY_PROCESS);
|
||||||
|
@ -115,7 +116,6 @@ BOOL ParseCmdline(int argc, wchar_t* argv[])
|
||||||
bDoShowProtoCons = TRUE;
|
bDoShowProtoCons = TRUE;
|
||||||
if (i+1 >= argc)
|
if (i+1 >= argc)
|
||||||
{
|
{
|
||||||
ConResPuts(StdOut, IDS_ACTIVE_CONNECT);
|
|
||||||
DisplayTableHeader();
|
DisplayTableHeader();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,6 @@ BOOL DisplayOutput(VOID)
|
||||||
{
|
{
|
||||||
if (bNoOptions)
|
if (bNoOptions)
|
||||||
{
|
{
|
||||||
ConResPuts(StdOut, IDS_ACTIVE_CONNECT);
|
|
||||||
DisplayTableHeader();
|
DisplayTableHeader();
|
||||||
return ShowTcpTable();
|
return ShowTcpTable();
|
||||||
}
|
}
|
||||||
|
@ -209,13 +208,11 @@ BOOL DisplayOutput(VOID)
|
||||||
case TCP:
|
case TCP:
|
||||||
if (bDoShowProtoStats)
|
if (bDoShowProtoStats)
|
||||||
ShowTcpStatistics();
|
ShowTcpStatistics();
|
||||||
ConResPuts(StdOut, IDS_ACTIVE_CONNECT);
|
|
||||||
DisplayTableHeader();
|
DisplayTableHeader();
|
||||||
return ShowTcpTable();
|
return ShowTcpTable();
|
||||||
case UDP:
|
case UDP:
|
||||||
if (bDoShowProtoStats)
|
if (bDoShowProtoStats)
|
||||||
ShowUdpStatistics();
|
ShowUdpStatistics();
|
||||||
ConResPuts(StdOut, IDS_ACTIVE_CONNECT);
|
|
||||||
DisplayTableHeader();
|
DisplayTableHeader();
|
||||||
return (bDoShowAllCons ? ShowUdpTable() : TRUE);
|
return (bDoShowAllCons ? ShowUdpTable() : TRUE);
|
||||||
default:
|
default:
|
||||||
|
@ -232,7 +229,6 @@ BOOL DisplayOutput(VOID)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConResPuts(StdOut, IDS_ACTIVE_CONNECT);
|
|
||||||
DisplayTableHeader();
|
DisplayTableHeader();
|
||||||
if (ShowTcpTable() && bDoShowAllCons)
|
if (ShowTcpTable() && bDoShowAllCons)
|
||||||
ShowUdpTable();
|
ShowUdpTable();
|
||||||
|
|
Loading…
Reference in a new issue