wget: -O FILE is allowed to overwrite existing file (compat)
[oweals/busybox.git] / networking / netstat.c
index 746e25091874d87a41a7729c7fda5380c199bdf2..5bacb47cc09f16732a72c5e4dbcc0f22db56605f 100644 (file)
@@ -47,8 +47,7 @@ enum {
        TCP_CLOSING /* now a valid state */
 };
 
-static const char * const tcp_state[] =
-{
+static const char *const tcp_state[] = {
        "",
        "ESTABLISHED",
        "SYN_SENT",
@@ -141,8 +140,8 @@ static char *ip_port_str(struct sockaddr *addr, int port, const char *proto, int
        /* 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);
@@ -498,7 +497,7 @@ int netstat_main(int argc, char **argv)
 #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;