Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ldpd get rid of unused variable/assignments
details: https://anonhg.NetBSD.org/src/rev/8ccc91e59efc
branches: trunk
changeset: 762047:8ccc91e59efc
user: kefren <kefren%NetBSD.org@localhost>
date: Mon Feb 14 11:43:59 2011 +0000
description:
get rid of unused variable/assignments
diffstat:
usr.sbin/ldpd/mpls_routes.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diffs (57 lines):
diff -r 02baf94ae01b -r 8ccc91e59efc usr.sbin/ldpd/mpls_routes.c
--- a/usr.sbin/ldpd/mpls_routes.c Mon Feb 14 10:22:19 2011 +0000
+++ b/usr.sbin/ldpd/mpls_routes.c Mon Feb 14 11:43:59 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mpls_routes.c,v 1.4 2011/02/09 11:38:57 kefren Exp $ */
+/* $NetBSD: mpls_routes.c,v 1.5 2011/02/14 11:43:59 kefren Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -635,25 +635,23 @@
*/
/* First of all check if we already know this one */
- lab = label_get(so_dest, so_pref);
- if (!lab) {
+ if (label_get(so_dest, so_pref) == NULL) {
if (!(rg->m_rtm.rtm_flags & RTF_GATEWAY))
- lab = label_add(so_dest, so_pref, NULL,
+ label_add(so_dest, so_pref, NULL,
MPLS_LABEL_IMPLNULL, NULL, 0);
else {
pm = ldp_test_mapping(&so_dest->sin.sin_addr,
prefixlen, &so_gate->sin.sin_addr);
if (pm) {
- lab = label_add(so_dest, so_pref,
+ label_add(so_dest, so_pref,
so_gate, 0, NULL, 0);
mpls_add_label(pm->peer, rg,
&so_dest->sin.sin_addr, prefixlen,
pm->lm->label, ROUTE_LOOKUP_LOOP);
free(pm);
} else
- lab = label_add(so_dest, so_pref,
- so_gate, MPLS_LABEL_IMPLNULL,
- NULL, 0);
+ label_add(so_dest, so_pref, so_gate,
+ MPLS_LABEL_IMPLNULL, NULL, 0);
}
} else /* We already know about this prefix */
debugp("Binding already there for prefix %s/%d !\n",
@@ -728,7 +726,6 @@
char *buf, *next, *lim;
struct rt_msghdr *rtmes;
union sockunion *so_dst, *so_pref, *so_gate;
- struct label *lab;
mib[0] = CTL_NET;
mib[1] = PF_ROUTE;
@@ -812,7 +809,7 @@
continue;
}
if (so_gate->sa.sa_family == AF_INET)
- lab = label_add(so_dst, so_pref, so_gate,
+ label_add(so_dst, so_pref, so_gate,
MPLS_LABEL_IMPLNULL, NULL, 0);
if (rtmes->rtm_flags & RTF_HOST)
Home |
Main Index |
Thread Index |
Old Index