Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 Remove unused variable and ifdef some others li...



details:   https://anonhg.NetBSD.org/src/rev/6ca47ed2af8b
branches:  trunk
changeset: 789954:6ca47ed2af8b
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Sep 14 11:33:59 2013 +0000

description:
Remove unused variable and ifdef some others like their use

diffstat:

 sys/netinet6/ip6_mroute.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (68 lines):

diff -r 878cfd0bab24 -r 6ca47ed2af8b sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c Sat Sep 14 10:41:18 2013 +0000
+++ b/sys/netinet6/ip6_mroute.c Sat Sep 14 11:33:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $        */
+/*     $NetBSD: ip6_mroute.c,v 1.104 2013/09/14 11:33:59 martin Exp $  */
 /*     $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $     */
 
 /*
@@ -117,7 +117,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.104 2013/09/14 11:33:59 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_mrouting.h"
@@ -1531,7 +1531,9 @@
 {
        struct mbuf *mb_copy;
        struct ifnet *ifp = mifp->m6_ifp;
+#ifdef MRT6DEBUG
        int error = 0;
+#endif
        int s;
        static struct route ro;
        struct in6_multi *in6m;
@@ -1569,7 +1571,10 @@
                /* XXX: ip6_output will override ip6->ip6_hlim */
                im6o.im6o_multicast_hlim = ip6->ip6_hlim;
                im6o.im6o_multicast_loop = 1;
-               error = ip6_output(mb_copy, NULL, &ro, IPV6_FORWARDING,
+#ifdef MRT6DEBUG
+               error =
+#endif
+                       ip6_output(mb_copy, NULL, &ro, IPV6_FORWARDING,
                                   &im6o, NULL, NULL);
 
 #ifdef MRT6DEBUG
@@ -1608,7 +1613,10 @@
                 * nd6_output on purpose to see if IPv6 operation is allowed
                 * on the interface.
                 */
-               error = nd6_output(ifp, ifp, mb_copy, &dst6, NULL);
+#ifdef MRT6DEBUG
+               error =
+#endif
+                       nd6_output(ifp, ifp, mb_copy, &dst6, NULL);
 #ifdef MRT6DEBUG
                if (mrt6debug & DEBUG_XMIT)
                        log(LOG_DEBUG, "phyint_send on mif %td err %d\n",
@@ -1712,7 +1720,6 @@
 pim6_input(struct mbuf **mp, int *offp, int proto)
 {
        struct pim *pim; /* pointer to a pim struct */
-       struct ip6_hdr *ip6;
        int pimlen;
        struct mbuf *m = *mp;
        int minlen;
@@ -1720,7 +1727,6 @@
 
        PIM6_STATINC(PIM6_STAT_RCV_TOTAL);
 
-       ip6 = mtod(m, struct ip6_hdr *);
        pimlen = m->m_pkthdr.len - *offp;
 
        /*



Home | Main Index | Thread Index | Old Index