summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ifmcstat
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2009-02-15 15:26:42 +0000
committerbms <bms@FreeBSD.org>2009-02-15 15:26:42 +0000
commitb13005f9d814cba5ac98e00cd9c9cecd759fd5c4 (patch)
treed9d8b79152425b7bb2d0ed420173a2c4a03a2237 /usr.sbin/ifmcstat
parent253044f78b322160c300cba20c39a32789d26757 (diff)
downloadFreeBSD-src-b13005f9d814cba5ac98e00cd9c9cecd759fd5c4.zip
FreeBSD-src-b13005f9d814cba5ac98e00cd9c9cecd759fd5c4.tar.gz
nits
Diffstat (limited to 'usr.sbin/ifmcstat')
-rw-r--r--usr.sbin/ifmcstat/ifmcstat.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/ifmcstat/ifmcstat.c b/usr.sbin/ifmcstat/ifmcstat.c
index 3b727ce..c8f57d4 100644
--- a/usr.sbin/ifmcstat/ifmcstat.c
+++ b/usr.sbin/ifmcstat/ifmcstat.c
@@ -193,7 +193,7 @@ main(int argc, char **argv)
if ((ifindex = if_nametoindex(optarg)) == 0) {
fprintf(stderr, "%s: unknown interface\n",
optarg);
- exit(1);
+ exit(EX_NOHOST);
}
break;
@@ -215,7 +215,7 @@ main(int argc, char **argv)
break;
}
fprintf(stderr, "%s: unknown address family\n", optarg);
- exit(1);
+ exit(EX_USAGE);
/*NOTREACHED*/
break;
@@ -253,9 +253,9 @@ main(int argc, char **argv)
#endif
error = ifmcstat_getifmaddrs();
if (error != 0)
- exit(1);
+ exit(EX_OSERR);
- exit(0);
+ exit(EX_OK);
/*NOTREACHED*/
}
@@ -296,7 +296,7 @@ ifmcstat_kvm(const char *kernel, const char *core)
#endif
if (vflag)
ll_addrlist(TAILQ_FIRST(&ifnet.if_addrhead));
-next:
+ next:
ifp = nifp;
}
@@ -309,7 +309,7 @@ kread(u_long addr, void *buf, int len)
if (kvm_read(kvmd, addr, buf, len) != len) {
perror("kvm_read");
- exit(1);
+ exit(EX_OSERR);
}
}
@@ -436,7 +436,7 @@ in6_multientry(struct in6_multi *mc)
printf("\t\tgroup %s", inet6_n2a(&multi.in6m_addr));
printf(" refcnt %u\n", multi.in6m_refcount);
- return(multi.in6m_entry.le_next);
+ return (multi.in6m_entry.le_next);
}
#endif /* INET6 */
@@ -584,7 +584,6 @@ in_addr_slistentry(struct in_addr_slist *ias, char *heading)
break;
KREAD(src.ias_list.le_next, &src, struct in_addr_source);
}
- return;
}
#endif /* HAVE_IGMPV3 */
@@ -615,10 +614,11 @@ inet6_n2a(struct in6_addr *p)
}
}
if (getnameinfo((struct sockaddr *)&sin6, sin6.sin6_len,
- buf, sizeof(buf), NULL, 0, niflags) == 0)
- return buf;
- else
- return "(invalid)";
+ buf, sizeof(buf), NULL, 0, niflags) == 0) {
+ return (buf);
+ } else {
+ return ("(invalid)");
+ }
}
#endif /* INET6 */
OpenPOWER on IntegriCloud