Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ifmcstat Inline trivial helper function.



details:   https://anonhg.NetBSD.org/src/rev/d6247665f990
branches:  trunk
changeset: 329621:d6247665f990
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri May 30 22:20:48 2014 +0000

description:
Inline trivial helper function.

diffstat:

 usr.sbin/ifmcstat/ifmcstat.c |  24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diffs (46 lines):

diff -r be463fb8a86e -r d6247665f990 usr.sbin/ifmcstat/ifmcstat.c
--- a/usr.sbin/ifmcstat/ifmcstat.c      Fri May 30 21:55:32 2014 +0000
+++ b/usr.sbin/ifmcstat/ifmcstat.c      Fri May 30 22:20:48 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ifmcstat.c,v 1.15 2014/05/30 02:31:40 joerg Exp $      */
+/*     $NetBSD: ifmcstat.c,v 1.16 2014/05/30 22:20:48 joerg Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,6 @@
 static void acmc(struct ether_multi *);
 static void if6_addrlist(struct ifaddr *);
 static void in6_multilist(struct in6_multi *);
-static struct in6_multi * in6_multientry(struct in6_multi *);
 
 #define        KREAD(addr, buf, type) \
        kread((u_long)addr, (void *)buf, sizeof(type))
@@ -233,20 +232,15 @@
        }
 }
 
-static struct in6_multi *
-in6_multientry(struct in6_multi *mc)
+static void
+in6_multilist(struct in6_multi *mc)
 {
        struct in6_multi multi;
 
-       KREAD(mc, &multi, struct in6_multi);
-       printf("\t\tgroup %s", inet6_n2a(&multi.in6m_addr));
-       printf(" refcnt %u\n", multi.in6m_refcount);
-       return(multi.in6m_entry.le_next);
+       while (mc) {
+               KREAD(mc, &multi, struct in6_multi);
+               printf("\t\tgroup %s", inet6_n2a(&multi.in6m_addr));
+               printf(" refcnt %u\n", multi.in6m_refcount);
+               mc = multi.in6m_entry.le_next;
+       }
 }
-
-static void
-in6_multilist(struct in6_multi *mc)
-{
-       while (mc)
-               mc = in6_multientry(mc);
-}



Home | Main Index | Thread Index | Old Index