Alexandre Julliard : netstat: Use nameless union/structs.
Module: wine Branch: master Commit: 52a868a8feda29ef14a93e410fc79ae81ad813a2 URL: https://gitlab.winehq.org/wine/wine/-/commit/52a868a8feda29ef14a93e410fc79ae... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 16 17:57:36 2023 +0200 netstat: Use nameless union/structs. --- programs/netstat/netstat.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/programs/netstat/netstat.c b/programs/netstat/netstat.c index 2c1ef89c231..6e771776b38 100644 --- a/programs/netstat/netstat.c +++ b/programs/netstat/netstat.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define NONAMELESSUNION #include <stdio.h> #include "netstat.h" #include <winsock2.h> @@ -256,9 +255,9 @@ static void NETSTAT_tcp_table(void) for (i = 0; i < table->dwNumEntries; i++) { - if ((table->table[i].u.dwState == MIB_TCP_STATE_CLOSE_WAIT) || - (table->table[i].u.dwState == MIB_TCP_STATE_ESTAB) || - (table->table[i].u.dwState == MIB_TCP_STATE_TIME_WAIT)) + if ((table->table[i].dwState == MIB_TCP_STATE_CLOSE_WAIT) || + (table->table[i].dwState == MIB_TCP_STATE_ESTAB) || + (table->table[i].dwState == MIB_TCP_STATE_TIME_WAIT)) { NETSTAT_host_name(table->table[i].dwLocalAddr, HostIp); NETSTAT_port_name(table->table[i].dwLocalPort, HostPort); @@ -267,7 +266,7 @@ static void NETSTAT_tcp_table(void) swprintf(Host, ARRAY_SIZE(Host), fmtcolon, HostIp, HostPort); swprintf(Remote, ARRAY_SIZE(Remote), fmtcolon, RemoteIp, RemotePort); - NETSTAT_wprintf(fmttcpout, tcpW, Host, Remote, tcpstatesW[table->table[i].u.dwState]); + NETSTAT_wprintf(fmttcpout, tcpW, Host, Remote, tcpstatesW[table->table[i].dwState]); } } HeapFree(GetProcessHeap(), 0, table);
participants (1)
-
Alexandre Julliard