Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2009 15:26:43 +0000 (UTC)
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188647 - head/usr.sbin/ifmcstat
Message-ID:  <200902151526.n1FFQhZ2082101@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bms
Date: Sun Feb 15 15:26:42 2009
New Revision: 188647
URL: http://svn.freebsd.org/changeset/base/188647

Log:
  nits

Modified:
  head/usr.sbin/ifmcstat/ifmcstat.c

Modified: head/usr.sbin/ifmcstat/ifmcstat.c
==============================================================================
--- head/usr.sbin/ifmcstat/ifmcstat.c	Sun Feb 15 15:21:34 2009	(r188646)
+++ head/usr.sbin/ifmcstat/ifmcstat.c	Sun Feb 15 15:26:42 2009	(r188647)
@@ -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 c
 #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 
 			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 */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902151526.n1FFQhZ2082101>