TCP_CLOSING /* now a valid state */
};
-static const char * const tcp_state[] =
-{
+static const char *const tcp_state[] = {
"",
"ESTABLISHED",
"SYN_SENT",
/* Code which used "*" for INADDR_ANY is removed: it's ambiguous in IPv6,
* while "0.0.0.0" is not. */
- host = numeric ? xmalloc_sockaddr2dotted_noport(addr, salen)
- : xmalloc_sockaddr2host_noport(addr, salen);
+ host = numeric ? xmalloc_sockaddr2dotted_noport(addr)
+ : xmalloc_sockaddr2host_noport(addr);
host_port = xasprintf("%s:%s", host, get_sname(htons(port), proto, numeric));
free(host);
#endif
/* Option string must match NETSTAT_xxx constants */
- opt = getopt32(argc, argv, NETSTAT_OPTS);
+ opt = getopt32(argv, NETSTAT_OPTS);
if (opt & 0x1) { // -l
flags &= ~NETSTAT_CONNECTED;
flags |= NETSTAT_LISTENING;