summaryrefslogtreecommitdiff
path: root/bgpd/bgp_aspath.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-12-17 13:14:28 +0300
committerDenis Ovsienko <infrastation@yandex.ru>2009-12-17 13:14:28 +0300
commitda88ea82acd70adf3bab641b2300ee24319da422 (patch)
tree81151de47e55067c4b7d9cd718c0e6c8ab07aa50 /bgpd/bgp_aspath.c
parent2c2397059d4d4177ed4636c08aa476a138425dc8 (diff)
bgpd: code cleanup
* bgpd/bgp_aspath.c * ashash: only used in one file, make static * aspath_count_numas(): dead code, sayonara * bgpd/bgpd.c * peer_nsf_stop(): only used in one file, make static * bgpd/bgp_packet.h * bgp_capability_receive(): add missing prototype for a global function
Diffstat (limited to 'bgpd/bgp_aspath.c')
-rw-r--r--bgpd/bgp_aspath.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index 3c8032f8..a9602d90 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -86,7 +86,7 @@ struct assegment_header
};
/* Hash for aspath. This is the top level structure of AS path. */
-struct hash *ashash;
+static struct hash *ashash;
/* Stream for SNMP. See aspath_snmp_pathseg */
static struct stream *snmp_stream;
@@ -501,22 +501,6 @@ aspath_has_as4 (struct aspath *aspath)
return 0;
}
-/* Return number of as numbers in in path */
-unsigned int
-aspath_count_numas (struct aspath *aspath)
-{
- struct assegment *seg = aspath->segments;
- unsigned int num;
-
- num=0;
- while (seg)
- {
- num += seg->length;
- seg = seg->next;
- }
- return num;
-}
-
/* Convert aspath structure to string expression. */
static char *
aspath_make_str_count (struct aspath *as)