diff options
author | Martin Mares <mj@ucw.cz> | 2004-06-05 11:58:23 +0200 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2004-06-05 11:58:23 +0200 |
commit | 9831e5916f6956377739f948869d377b091f5c92 (patch) | |
tree | 47fd922a6348067faa9a2441cbe480fe8bc6be75 | |
parent | 598b984d1f04ea71fc04bc89f390f230a3960680 (diff) | |
download | bird-9831e5916f6956377739f948869d377b091f5c92.tar bird-9831e5916f6956377739f948869d377b091f5c92.zip |
Staticized lots of local functions.
-rw-r--r-- | filter/filter.c | 8 | ||||
-rw-r--r-- | lib/slab.c | 2 | ||||
-rw-r--r-- | proto/bgp/bgp.c | 2 | ||||
-rw-r--r-- | proto/ospf/dbdes.c | 2 | ||||
-rw-r--r-- | proto/ospf/iface.c | 6 | ||||
-rw-r--r-- | proto/ospf/neighbor.c | 3 | ||||
-rw-r--r-- | proto/ospf/packet.c | 2 | ||||
-rw-r--r-- | proto/ospf/topology.c | 4 | ||||
-rw-r--r-- | sysdep/linux/netlink/netlink.c | 2 |
9 files changed, 15 insertions, 16 deletions
diff --git a/filter/filter.c b/filter/filter.c index 9bae856..9cde3d9 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -50,7 +50,7 @@ #define CMP_ERROR 999 -struct adata * +static struct adata * adata_empty(struct linpool *pool) { struct adata *res = lp_alloc(pool, sizeof(struct adata)); @@ -122,7 +122,7 @@ val_compare(struct f_val v1, struct f_val v2) /* * val_simple_in_range - check if @v1 ~ @v2 for everything except sets */ -int +static int val_simple_in_range(struct f_val v1, struct f_val v2) { if ((v1.type == T_PATH) && (v2.type == T_PATH_MASK)) @@ -161,7 +161,7 @@ val_simple_in_range(struct f_val v1, struct f_val v2) * Checks if @v1 is element (|~| operator) of @v2. Sets are internally represented as balanced trees, see * |tree.c| module (this is not limited to sets, but for non-set cases, val_simple_in_range() is called early). */ -int +static int val_in_range(struct f_val v1, struct f_val v2) { int res; @@ -240,7 +240,7 @@ static rta *f_rta_copy; /* * rta_cow - prepare rta for modification by filter */ -void +static void rta_cow(void) { if (!f_rta_copy) { @@ -188,7 +188,7 @@ sl_new(pool *p, unsigned size) return s; } -struct sl_head * +static struct sl_head * sl_new_head(slab *s) { struct sl_head *h = xmalloc(SLAB_SIZE); diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 9258d14..cedd223 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -76,7 +76,7 @@ static void bgp_connect(struct bgp_proto *p); static void bgp_initiate(struct bgp_proto *p); static void bgp_setup_listen_sk(void); -void +static void bgp_close(struct bgp_proto *p UNUSED) { ASSERT(bgp_counter); diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index bd78750..5b45544 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -147,7 +147,7 @@ ospf_dbdes_send(struct ospf_neighbor *n) } } -void +static void ospf_dbdes_reqladd(struct ospf_dbdes_packet *ps, struct ospf_neighbor *n) { struct ospf_lsa_header *plsa, lsa; diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index 70e73b9..df73295 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -16,19 +16,19 @@ char *ospf_ism[]={ "interface up", "wait timer fired", "backup seen", char *ospf_it[]={ "broadcast", "nbma", "point-to-point", "virtual link" }; -void +static void poll_timer_hook(timer *timer) { ospf_hello_send(timer, 1, NULL); } -void +static void hello_timer_hook(timer *timer) { ospf_hello_send(timer, 0, NULL); } -void +static void wait_timer_hook(timer *timer) { struct ospf_iface *ifa; diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 1ccc276..3337aab 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -210,7 +210,7 @@ electdr(list nl) return(n); } -int +static int can_do_adj(struct ospf_neighbor *n) { struct ospf_iface *ifa; @@ -569,7 +569,6 @@ void rxmt_timer_hook(timer *timer) { struct ospf_neighbor *n = (struct ospf_neighbor *)timer->data; - struct ospf_iface *ifa = n->ifa; struct top_hash_entry *en; DBG("%s: RXMT timer fired on interface %s for neigh: %I.\n", diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index 441bf04..7bdc104 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -36,7 +36,7 @@ ospf_tx_authenticate (struct ospf_iface *ifa, struct ospf_packet *pkt) return; } -int +static int ospf_rx_authenticate (struct ospf_iface *ifa, struct ospf_packet *pkt) { int i; diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 81d35cc..73d2ddd 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -20,7 +20,7 @@ #define HASH_LO_STEP 2 #define HASH_LO_MIN 8 -void * +static void * originate_rt_lsa_body(struct ospf_area *oa, u16 *length, struct proto_ospf *p) { struct ospf_iface *ifa; @@ -216,7 +216,7 @@ originate_rt_lsa(struct ospf_area *oa) oa->origrt=0; } -void * +static void * originate_net_lsa_body(struct ospf_iface *ifa, u16 *length, struct proto_ospf *po) { diff --git a/sysdep/linux/netlink/netlink.c b/sysdep/linux/netlink/netlink.c index 83e93c9..a54e115 100644 --- a/sysdep/linux/netlink/netlink.c +++ b/sysdep/linux/netlink/netlink.c @@ -541,7 +541,7 @@ krt_set_notify(struct krt_proto *p, net *n UNUSED, rte *new, rte *old) } } -struct iface * +static struct iface * krt_temp_iface(struct krt_proto *p, unsigned index) { struct iface *i, *j; |