diff --git a/usr.bin/netstat/bpf.c b/usr.bin/netstat/bpf.c --- a/usr.bin/netstat/bpf.c +++ b/usr.bin/netstat/bpf.c @@ -42,7 +42,6 @@ #include #include -#include #include #include #include diff --git a/usr.bin/netstat/common.c b/usr.bin/netstat/common.c --- a/usr.bin/netstat/common.c +++ b/usr.bin/netstat/common.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include "netstat.h" #include "common.h" @@ -103,7 +102,7 @@ * since we need #ifindex -> if_xname match */ if (getifaddrs(&ifap) != 0) - err(EX_OSERR, "getifaddrs"); + xo_err(EX_OSERR, "getifaddrs"); for (ifa = ifap; ifa; ifa = ifa->ifa_next) { @@ -117,7 +116,7 @@ size = roundup2(ifindex + 1, 32) * sizeof(struct ifmap_entry); if ((ifmap = realloc(ifmap, size)) == NULL) - errx(2, "realloc(%d) failed", size); + xo_errx(EX_OSERR, "realloc(%d) failed", size); memset(&ifmap[ifmap_size], 0, size - ifmap_size * sizeof(struct ifmap_entry)); diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -57,7 +57,6 @@ #include #endif -#include #include #include #include @@ -378,9 +377,9 @@ return sidewaysintpr(); if (getifaddrs(&ifap) != 0) - err(EX_OSERR, "getifaddrs"); + xo_err(EX_OSERR, "getifaddrs"); if (aflag && getifmaddrs(&ifmap) != 0) - err(EX_OSERR, "getifmaddrs"); + xo_err(EX_OSERR, "getifmaddrs"); for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if (interface != NULL && diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -72,7 +72,6 @@ #include #include -#include #include #include #include diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -62,7 +62,6 @@ #include #include -#include #include #include #include diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -58,7 +58,6 @@ #endif #include -#include #include #include #include @@ -70,6 +69,7 @@ #include #include #include +#include #include #include "netstat.h" #include "nl_defs.h" @@ -294,7 +294,7 @@ fib = strtol(optarg, &endptr, 0); if (*endptr != '\0' || (fib == 0 && (errno == EINVAL || errno == ERANGE))) - xo_errx(1, "%s: invalid fib", optarg); + xo_errx(EX_DATAERR, "%s: invalid fib", optarg); break; case 'f': if (strcmp(optarg, "inet") == 0) @@ -318,7 +318,7 @@ else if (strcmp(optarg, "link") == 0) af = AF_LINK; else { - xo_errx(1, "%s: unknown address family", + xo_errx(EX_DATAERR, "%s: unknown address family", optarg); } break; @@ -366,7 +366,7 @@ break; case 'p': if ((tp = name2protox(optarg)) == NULL) { - xo_errx(1, "%s: unknown or uninstrumented " + xo_errx(EX_DATAERR, "%s: unknown or uninstrumented " "protocol", optarg); } pflag = 1; @@ -443,20 +443,21 @@ live = (nlistf == NULL && memf == NULL); if (!live) { if (setgid(getgid()) != 0) - xo_err(-1, "setgid"); + xo_err(EX_OSERR, "setgid"); /* Load all necessary kvm symbols */ kresolve_list(nl); } if (xflag && Tflag) - xo_errx(1, "-x and -T are incompatible, pick one."); + xo_errx(EX_USAGE, "-x and -T are incompatible, pick one."); if (Bflag) { if (!live) usage(); bpf_stats(interface); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } if (mflag) { if (!live) { @@ -464,8 +465,9 @@ mbpr(kvmd, nl[N_SFSTAT].n_value); } else mbpr(NULL, 0); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } if (Qflag) { if (!live) { @@ -473,8 +475,9 @@ netisr_stats(); } else netisr_stats(); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } #if 0 /* @@ -494,8 +497,9 @@ xo_open_container("statistics"); intpr(NULL, af); xo_close_container("statistics"); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } if (rflag) { xo_open_container("statistics"); @@ -507,22 +511,25 @@ } else routepr(fib, af); xo_close_container("statistics"); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } if (oflag) { xo_open_container("statistics"); nhops_print(fib, af); xo_close_container("statistics"); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } if (Oflag) { xo_open_container("statistics"); nhgrp_print(fib, af); xo_close_container("statistics"); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } @@ -545,8 +552,9 @@ #endif } xo_close_container("statistics"); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } if (tp) { @@ -555,8 +563,9 @@ if (!first) xo_close_list("socket"); xo_close_container("statistics"); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } xo_open_container("statistics"); @@ -586,8 +595,9 @@ if (!first) xo_close_list("socket"); xo_close_container("statistics"); - xo_finish(); - exit(0); + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); + exit(EX_OK); } static int @@ -707,7 +717,7 @@ kvmd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf); if (setgid(getgid()) != 0) - xo_err(-1, "setgid"); + xo_err(EX_OSERR, "setgid"); if (kvmd == NULL) { xo_warnx("kvm not available: %s", errbuf); @@ -732,10 +742,10 @@ if (kvm_nlist(kvmd, _nl) < 0) { if (nlistf) - xo_errx(1, "%s: kvm_nlist: %s", nlistf, + xo_errx(EX_UNAVAILABLE, "%s: kvm_nlist: %s", nlistf, kvm_geterr(kvmd)); else - xo_errx(1, "kvm_nlist: %s", kvm_geterr(kvmd)); + xo_errx(EX_UNAVAILABLE, "kvm_nlist: %s", kvm_geterr(kvmd)); } return (0); @@ -749,10 +759,10 @@ { if ((kvmd == NULL) && (kvmd_init() != 0)) - xo_errx(-1, "%s: kvm is not available", __func__); + xo_errx(EX_UNAVAILABLE, "%s: kvm is not available", __func__); if (kvm_dpcpu_setcpu(kvmd, cpuid) < 0) - xo_errx(-1, "%s: kvm_dpcpu_setcpu(%u): %s", __func__, + xo_errx(EX_UNAVAILABLE, "%s: kvm_dpcpu_setcpu(%u): %s", __func__, cpuid, kvm_geterr(kvmd)); return; } @@ -809,7 +819,7 @@ n = size / sizeof(uint64_t); if ((counters = malloc(n * sizeof(u_long))) == NULL) - xo_err(-1, "malloc"); + xo_err(EX_OSERR, "malloc"); if (kread(addr, counters, n * sizeof(u_long)) < 0) { free(counters); return (-1); @@ -889,7 +899,7 @@ static void usage(void) { - (void)xo_error("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", + xo_error("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", "usage: netstat [-46AaCcLnRSTWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -i | -I interface [-46abdhnW] [-f address_family]\n" @@ -908,6 +918,5 @@ " netstat -g [-46W] [-f address_family] [-M core] [-N system]", " netstat -gs [-46s] [-f address_family] [-M core] [-N system]", " netstat -Q"); - xo_finish(); - exit(1); + exit(EX_USAGE); } diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c --- a/usr.bin/netstat/mbuf.c +++ b/usr.bin/netstat/mbuf.c @@ -52,7 +52,6 @@ #include #include -#include #include #include #include diff --git a/usr.bin/netstat/mroute.c b/usr.bin/netstat/mroute.c --- a/usr.bin/netstat/mroute.c +++ b/usr.bin/netstat/mroute.c @@ -66,7 +66,6 @@ #include #undef _NETSTAT_ -#include #include #include #include diff --git a/usr.bin/netstat/mroute6.c b/usr.bin/netstat/mroute6.c --- a/usr.bin/netstat/mroute6.c +++ b/usr.bin/netstat/mroute6.c @@ -85,7 +85,6 @@ #include -#include #include #include #include diff --git a/usr.bin/netstat/netgraph.c b/usr.bin/netstat/netgraph.c --- a/usr.bin/netstat/netgraph.c +++ b/usr.bin/netstat/netgraph.c @@ -56,7 +56,6 @@ #include #include #include -#include #include #include "netstat.h" diff --git a/usr.bin/netstat/netisr.c b/usr.bin/netstat/netisr.c --- a/usr.bin/netstat/netisr.c +++ b/usr.bin/netstat/netisr.c @@ -43,12 +43,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include "netstat.h" #include "nl_defs.h" @@ -115,7 +115,7 @@ for (i = 0; i < limit; i++) { if (kread(addr + i, &dest[i], sizeof(dest[i])) != 0) - xo_errx(-1, "%s: kread()", __func__); + xo_errx(EX_OSERR, "%s: kread()", __func__); if (dest[i] == '\0') break; } @@ -170,9 +170,9 @@ retlen = sizeof(u_int); if (sysctlbyname(name, p, &retlen, NULL, 0) < 0) - xo_err(-1, "%s", name); + xo_err(EX_OSERR, "%s", name); if (retlen != sizeof(u_int)) - xo_errx(-1, "%s: invalid len %ju", name, (uintmax_t)retlen); + xo_errx(EX_DATAERR, "%s: invalid len %ju", name, (uintmax_t)retlen); } static void @@ -182,7 +182,7 @@ retlen = len; if (sysctlbyname(name, p, &retlen, NULL, 0) < 0) - xo_err(-1, "%s", name); + xo_err(EX_OSERR, "%s", name); p[len - 1] = '\0'; } @@ -215,13 +215,13 @@ */ kread(nl[N_NETISR_MAXPROT].n_value, &maxprot, sizeof(u_int)); if (maxprot != NETISR_MAXPROT) - xo_errx(-1, "%s: NETISR_MAXPROT mismatch", __func__); + xo_errx(EX_DATAERR, "%s: NETISR_MAXPROT mismatch", __func__); len = maxprot * sizeof(*np_array); np_array = malloc(len); if (np_array == NULL) - xo_err(-1, "%s: malloc", __func__); + xo_err(EX_OSERR, "%s: malloc", __func__); if (kread(nl[N_NETISR_PROTO].n_value, np_array, len) != 0) - xo_errx(-1, "%s: kread(_netisr_proto)", __func__); + xo_errx(EX_DATAERR, "%s: kread(_netisr_proto)", __func__); /* * Size and allocate memory to hold only live protocols. @@ -234,7 +234,7 @@ } proto_array = calloc(protocount, sizeof(*proto_array)); if (proto_array == NULL) - err(-1, "malloc"); + xo_err(EX_OSERR, "malloc"); protocount = 0; for (i = 0; i < maxprot; i++) { npp = &np_array[i]; @@ -266,21 +266,21 @@ size_t len; if (sysctlbyname("net.isr.proto", NULL, &len, NULL, 0) < 0) - xo_err(-1, "net.isr.proto: query len"); + xo_err(EX_OSERR, "net.isr.proto: query len"); if (len % sizeof(*proto_array) != 0) - xo_errx(-1, "net.isr.proto: invalid len"); + xo_errx(EX_DATAERR, "net.isr.proto: invalid len"); proto_array = malloc(len); if (proto_array == NULL) - xo_err(-1, "malloc"); + xo_err(EX_OSERR, "malloc"); if (sysctlbyname("net.isr.proto", proto_array, &len, NULL, 0) < 0) - xo_err(-1, "net.isr.proto: query data"); + xo_err(EX_OSERR, "net.isr.proto: query data"); if (len % sizeof(*proto_array) != 0) - xo_errx(-1, "net.isr.proto: invalid len"); + xo_errx(EX_DATAERR, "net.isr.proto: invalid len"); proto_array_len = len / sizeof(*proto_array); if (proto_array_len < 1) - xo_errx(-1, "net.isr.proto: no data"); + xo_errx(EX_DATAERR, "net.isr.proto: no data"); if (proto_array[0].snp_version != sizeof(proto_array[0])) - xo_errx(-1, "net.isr.proto: invalid version"); + xo_errx(EX_DATAERR, "net.isr.proto: invalid version"); } static void @@ -296,22 +296,22 @@ len = numthreads * sizeof(*nws_array); nws_array = malloc(len); if (nws_array == NULL) - xo_err(-1, "malloc"); + xo_err(EX_OSERR, "malloc"); if (kread(nl[N_NWS_ARRAY].n_value, nws_array, len) != 0) - xo_errx(-1, "%s: kread(_nws_array)", __func__); + xo_errx(EX_OSERR, "%s: kread(_nws_array)", __func__); workstream_array = calloc(numthreads, sizeof(*workstream_array)); if (workstream_array == NULL) - xo_err(-1, "calloc"); + xo_err(EX_OSERR, "calloc"); workstream_array_len = numthreads; work_array = calloc(numthreads * proto_array_len, sizeof(*work_array)); if (work_array == NULL) - xo_err(-1, "calloc"); + xo_err(EX_OSERR, "calloc"); counter = 0; for (wsid = 0; wsid < numthreads; wsid++) { cpuid = nws_array[wsid]; kset_dpcpu(cpuid); if (kread(nl[N_NWS].n_value, &nws, sizeof(nws)) != 0) - xo_errx(-1, "%s: kread(nw)", __func__); + xo_errx(EX_OSERR, "%s: kread(nw)", __func__); snwsp = &workstream_array[wsid]; snwsp->snws_version = sizeof(*snwsp); snwsp->snws_wsid = cpuid; @@ -351,22 +351,22 @@ size_t len; if (sysctlbyname("net.isr.workstream", NULL, &len, NULL, 0) < 0) - xo_err(-1, "net.isr.workstream: query len"); + xo_err(EX_OSERR, "net.isr.workstream: query len"); if (len % sizeof(*workstream_array) != 0) - xo_errx(-1, "net.isr.workstream: invalid len"); + xo_errx(EX_DATAERR, "net.isr.workstream: invalid len"); workstream_array = malloc(len); if (workstream_array == NULL) - xo_err(-1, "malloc"); + xo_err(EX_OSERR, "malloc"); if (sysctlbyname("net.isr.workstream", workstream_array, &len, NULL, 0) < 0) - xo_err(-1, "net.isr.workstream: query data"); + xo_err(EX_OSERR, "net.isr.workstream: query data"); if (len % sizeof(*workstream_array) != 0) - xo_errx(-1, "net.isr.workstream: invalid len"); + xo_errx(EX_DATAERR, "net.isr.workstream: invalid len"); workstream_array_len = len / sizeof(*workstream_array); if (workstream_array_len < 1) - xo_errx(-1, "net.isr.workstream: no data"); + xo_errx(EX_DATAERR, "net.isr.workstream: no data"); if (workstream_array[0].snws_version != sizeof(workstream_array[0])) - xo_errx(-1, "net.isr.workstream: invalid version"); + xo_errx(EX_DATAERR, "net.isr.workstream: invalid version"); } static void @@ -375,21 +375,21 @@ size_t len; if (sysctlbyname("net.isr.work", NULL, &len, NULL, 0) < 0) - xo_err(-1, "net.isr.work: query len"); + xo_err(EX_OSERR, "net.isr.work: query len"); if (len % sizeof(*work_array) != 0) - xo_errx(-1, "net.isr.work: invalid len"); + xo_errx(EX_DATAERR, "net.isr.work: invalid len"); work_array = malloc(len); if (work_array == NULL) - xo_err(-1, "malloc"); + xo_err(EX_OSERR, "malloc"); if (sysctlbyname("net.isr.work", work_array, &len, NULL, 0) < 0) - xo_err(-1, "net.isr.work: query data"); + xo_err(EX_OSERR, "net.isr.work: query data"); if (len % sizeof(*work_array) != 0) - xo_errx(-1, "net.isr.work: invalid len"); + xo_errx(EX_DATAERR, "net.isr.work: invalid len"); work_array_len = len / sizeof(*work_array); if (work_array_len < 1) - xo_errx(-1, "net.isr.work: no data"); + xo_errx(EX_DATAERR, "net.isr.work: no data"); if (work_array[0].snw_version != sizeof(work_array[0])) - xo_errx(-1, "net.isr.work: invalid version"); + xo_errx(EX_DATAERR, "net.isr.work: invalid version"); } static void diff --git a/usr.bin/netstat/nhgrp.c b/usr.bin/netstat/nhgrp.c --- a/usr.bin/netstat/nhgrp.c +++ b/usr.bin/netstat/nhgrp.c @@ -47,7 +47,6 @@ #include #include #include -#include #include #include "netstat.h" #include "common.h" @@ -211,12 +210,12 @@ mib[5] = 0; mib[6] = fibnum; if (sysctl(mib, nitems(mib), NULL, &needed, NULL, 0) < 0) - err(EX_OSERR, "sysctl: net.route.0.%d.nhgrpdump.%d estimate", + xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhgrpdump.%d estimate", af, fibnum); if ((buf = malloc(needed)) == NULL) - errx(2, "malloc(%lu)", (unsigned long)needed); + xo_errx(EX_OSERR, "malloc(%lu)", (unsigned long)needed); if (sysctl(mib, nitems(mib), buf, &needed, NULL, 0) < 0) - err(1, "sysctl: net.route.0.%d.nhgrpdump.%d", af, fibnum); + xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhgrpdump.%d", af, fibnum); lim = buf + needed; /* @@ -339,7 +338,7 @@ if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) numfibs = 1; if (fibnum < 0 || fibnum > numfibs - 1) - errx(EX_USAGE, "%d: invalid fib", fibnum); + xo_errx(EX_USAGE, "%d: invalid fib", fibnum); ifmap = prepare_ifmap(&ifmap_size); prepare_nh_map(fibnum, af); diff --git a/usr.bin/netstat/nhops.c b/usr.bin/netstat/nhops.c --- a/usr.bin/netstat/nhops.c +++ b/usr.bin/netstat/nhops.c @@ -61,7 +61,6 @@ #include #include #include -#include #include #include "netstat.h" #include "common.h" @@ -217,7 +216,7 @@ sz = new_size * (sizeof(struct nhop_entry)); if ((map->ptr = realloc(map->ptr, sz)) == NULL) - errx(2, "realloc(%zu) failed", sz); + xo_errx(EX_OSERR, "realloc(%zu) failed", sz); memset(&map->ptr[map->size], 0, (new_size - map->size) * sizeof(struct nhop_entry)); map->size = new_size; @@ -356,12 +355,12 @@ mib[5] = 0; mib[6] = fibnum; if (sysctl(mib, nitems(mib), NULL, &needed, NULL, 0) < 0) - err(EX_OSERR, "sysctl: net.route.0.%d.nhdump.%d estimate", af, + xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhdump.%d estimate", af, fibnum); if ((buf = malloc(needed)) == NULL) - errx(2, "malloc(%lu)", (unsigned long)needed); + xo_errx(EX_OSERR, "malloc(%lu)", (unsigned long)needed); if (sysctl(mib, nitems(mib), buf, &needed, NULL, 0) < 0) - err(1, "sysctl: net.route.0.%d.nhdump.%d", af, fibnum); + xo_err(EX_OSERR, "sysctl: net.route.0.%d.nhdump.%d", af, fibnum); lim = buf + needed; /* @@ -467,7 +466,7 @@ if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) numfibs = 1; if (fibnum < 0 || fibnum > numfibs - 1) - errx(EX_USAGE, "%d: invalid fib", fibnum); + xo_errx(EX_USAGE, "%d: invalid fib", fibnum); ifmap = prepare_ifmap(&ifmap_size); diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -66,7 +66,6 @@ #include #include #include -#include #include #include "netstat.h" #include "common.h" @@ -133,14 +132,14 @@ if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) numfibs = 1; if (fibnum < 0 || fibnum > numfibs - 1) - errx(EX_USAGE, "%d: invalid fib", fibnum); + xo_errx(EX_USAGE, "%d: invalid fib", fibnum); /* * Since kernel & userland use different timebase * (time_uptime vs time_second) and we are reading kernel memory * directly we should do rt_expire --> expire_time conversion. */ if (clock_gettime(CLOCK_UPTIME, &uptime) < 0) - err(EX_OSERR, "clock_gettime() failed"); + xo_err(EX_OSERR, "clock_gettime() failed"); xo_open_container("route-information"); xo_emit("{T:Routing tables}"); @@ -269,12 +268,12 @@ mib[5] = 0; mib[6] = fibnum; if (sysctl(mib, nitems(mib), NULL, &needed, NULL, 0) < 0) - err(EX_OSERR, "sysctl: net.route.0.%d.dump.%d estimate", af, + xo_err(EX_OSERR, "sysctl: net.route.0.%d.dump.%d estimate", af, fibnum); if ((buf = malloc(needed)) == NULL) - errx(2, "malloc(%lu)", (unsigned long)needed); + xo_errx(EX_OSERR, "malloc(%lu)", (unsigned long)needed); if (sysctl(mib, nitems(mib), buf, &needed, NULL, 0) < 0) - err(1, "sysctl: net.route.0.%d.dump.%d", af, fibnum); + xo_err(EX_OSERR, "sysctl: net.route.0.%d.dump.%d", af, fibnum); lim = buf + needed; xo_open_container("route-table"); xo_open_list("rt-family"); diff --git a/usr.bin/netstat/route_netlink.c b/usr.bin/netstat/route_netlink.c --- a/usr.bin/netstat/route_netlink.c +++ b/usr.bin/netstat/route_netlink.c @@ -65,7 +65,6 @@ #include #include #include -#include #include #include "netstat.h" #include "common.h" @@ -107,7 +106,7 @@ if (link.ifi_index >= ifmap_size) { size_t size = roundup2(link.ifi_index + 1, 32) * sizeof(struct ifmap_entry); if ((ifmap = realloc(ifmap, size)) == NULL) - errx(2, "realloc(%zu) failed", size); + xo_errx(EX_OSERR, "realloc(%zu) failed", size); memset(&ifmap[ifmap_size], 0, size - ifmap_size * sizeof(struct ifmap_entry)); diff --git a/usr.bin/netstat/sctp.c b/usr.bin/netstat/sctp.c --- a/usr.bin/netstat/sctp.c +++ b/usr.bin/netstat/sctp.c @@ -53,7 +53,6 @@ #include #include -#include #include #include #include diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c --- a/usr.bin/netstat/unix.c +++ b/usr.bin/netstat/unix.c @@ -56,7 +56,6 @@ #include #include -#include #include #include #include