[PATCH 1/3] Remove unreachable code

Michele Baldessari michele at acksyn.org
Sat Oct 27 14:38:20 EDT 2012


This code gets never called anyway
---
 lib/route/addr.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/lib/route/addr.c b/lib/route/addr.c
index 600857b..8ae16ef 100644
--- a/lib/route/addr.c
+++ b/lib/route/addr.c
@@ -890,11 +890,6 @@ struct nl_addr *rtnl_addr_get_local(struct rtnl_addr *addr)
 int rtnl_addr_set_peer(struct rtnl_addr *addr, struct nl_addr *peer)
 {
 	return __assign_addr(addr, &addr->a_peer, peer, ADDR_ATTR_PEER);
-
-	addr->a_prefixlen = nl_addr_get_prefixlen(addr->a_peer);
-	addr->ce_mask |= ADDR_ATTR_PREFIXLEN;
-
-	return 0;
 }
 
 struct nl_addr *rtnl_addr_get_peer(struct rtnl_addr *addr)
-- 
1.7.12.1




More information about the libnl mailing list