]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: compile warnings cleanup
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 10 Dec 2009 08:57:05 +0000 (11:57 +0300)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 10 Dec 2009 08:57:05 +0000 (11:57 +0300)
* bgpd/bgp_fsm.c
  * bgp_clearing_completed(): only used in one file, can be static
* bgpd/bgp_packet.c
  * afi2str(): sayonara
  * safi2str(): sayonara
* bgpd/bgp_route.c
  * bgp_distance_reset(): sayonara
* bgpd/bgp_zebra.c
  * bgp_ifindex_by_nexthop(): sayonara

bgpd/bgp_fsm.c
bgpd/bgp_packet.c
bgpd/bgp_route.c
bgpd/bgp_zebra.c

index 6121e74a812dfab514d9360ac390c8e116f5d2fb..c815f9a17cad6a95a7c0dffdf471c262c6021ea9 100644 (file)
@@ -427,7 +427,7 @@ bgp_fsm_change_status (struct peer *peer, int status)
 }
 
 /* Flush the event queue and ensure the peer is shut down */
-int
+static int
 bgp_clearing_completed (struct peer *peer)
 {
   int rc = bgp_stop(peer);
index 1c9a3c911edc3ddf7d2435b5fde785394ffc7e26..6153419181b6bfc7b053b0ddcb1b3d2b5eff0ff0 100644 (file)
@@ -920,30 +920,6 @@ bgp_notify_send (struct peer *peer, u_char code, u_char sub_code)
   bgp_notify_send_with_data (peer, code, sub_code, NULL, 0);
 }
 
-static const char *
-afi2str (afi_t afi)
-{
-  if (afi == AFI_IP)
-    return "AFI_IP";
-  else if (afi == AFI_IP6)
-    return "AFI_IP6";
-  else
-    return "Unknown AFI";
-}
-
-static const char *
-safi2str (safi_t safi)
-{
-  if (safi == SAFI_UNICAST)
-    return "SAFI_UNICAST";
-  else if (safi == SAFI_MULTICAST)
-    return "SAFI_MULTICAST";
-  else if (safi == SAFI_MPLS_VPN || safi == BGP_SAFI_VPNV4)
-    return "SAFI_MPLS_VPN";
-  else
-    return "Unknown SAFI";
-}
-
 /* Send route refresh message to the peer. */
 void
 bgp_route_refresh_send (struct peer *peer, afi_t afi, safi_t safi,
index 208803968078b0b07ec4dff00f9b190db47b5f8e..f3144fea301f8473350e503909ec5bbdb32cc6a3 100644 (file)
@@ -11031,23 +11031,6 @@ bgp_distance_unset (struct vty *vty, const char *distance_str,
   return CMD_SUCCESS;
 }
 
-static void
-bgp_distance_reset (void)
-{
-  struct bgp_node *rn;
-  struct bgp_distance *bdistance;
-
-  for (rn = bgp_table_top (bgp_distance_table); rn; rn = bgp_route_next (rn))
-    if ((bdistance = rn->info) != NULL)
-      {
-       if (bdistance->access_list)
-         free (bdistance->access_list);
-       bgp_distance_free (bdistance);
-       rn->info = NULL;
-       bgp_unlock_node (rn);
-      }
-}
-
 /* Apply BGP information to distance method. */
 u_char
 bgp_distance_apply (struct prefix *p, struct bgp_info *rinfo, struct bgp *bgp)
index 49380cc37b87135173fc05666062baa078d5fb05..f3baeee0e6dd19fbe6600083c11f06477db70940 100644 (file)
@@ -639,39 +639,6 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote,
   return ret;
 }
 
-#ifdef HAVE_IPV6
-static unsigned int
-bgp_ifindex_by_nexthop (struct in6_addr *addr)
-{
-  struct listnode *ifnode;
-  struct listnode *cnode;
-  struct interface *ifp;
-  struct connected *connected;
-  struct prefix_ipv6 p;
-  
-  p.family = AF_INET6;
-  p.prefix = *addr;
-  p.prefixlen = IPV6_MAX_BITLEN;
-
-  for (ALL_LIST_ELEMENTS_RO (iflist, ifnode, ifp))
-    {
-      for (ALL_LIST_ELEMENTS_RO (ifp->connected, cnode, connected))
-       {
-         struct prefix *cp; 
-
-         cp = connected->address;
-           
-         if (cp->family == AF_INET6)
-           {
-             if (prefix_match (cp, (struct prefix *)&p))
-               return ifp->ifindex;
-           }
-       }
-    }
-  return 0;
-}
-#endif /* HAVE_IPV6 */
-
 void
 bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp)
 {