summaryrefslogtreecommitdiff
path: root/bgpd/bgp_filter.c
diff options
context:
space:
mode:
authorpaul <paul>2004-10-13 05:06:08 +0000
committerpaul <paul>2004-10-13 05:06:08 +0000
commitfd79ac918b8feaacebe9719adaac97dffb69137a (patch)
treed0665eb68e60da9d6e364414cdb61830f19f33d3 /bgpd/bgp_filter.c
parent39db97e4e02eae08a1e18528367b6e9b07eb6a93 (diff)
2004-10-13 Paul Jakma <paul@dishone.st>
* (global) more const'ification and fixups of types to clean up code. * bgp_mplsvpn.{c,h}: (str2tag) fix abuse. Still not perfect, should use something like the VTY_GET_INTEGER macro, but without the vty_out bits.. * bgp_routemap.c: (set_aggregator_as) use VTY_GET_INTEGER_RANGE (no_set_aggregator_as) ditto. * bgpd.c: (peer_uptime) fix unlikely bug, where no buffer is returned, add comments about troublesome return value.
Diffstat (limited to 'bgpd/bgp_filter.c')
-rw-r--r--bgpd/bgp_filter.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c
index 7a8fb039..09dcc0fa 100644
--- a/bgpd/bgp_filter.c
+++ b/bgpd/bgp_filter.c
@@ -119,7 +119,7 @@ as_filter_free (struct as_filter *asfilter)
/* Make new AS filter. */
struct as_filter *
-as_filter_make (regex_t *reg, char *reg_str, enum as_filter_type type)
+as_filter_make (regex_t *reg, const char *reg_str, enum as_filter_type type)
{
struct as_filter *asfilter;
@@ -132,7 +132,7 @@ as_filter_make (regex_t *reg, char *reg_str, enum as_filter_type type)
}
struct as_filter *
-as_filter_lookup (struct as_list *aslist, char *reg_str,
+as_filter_lookup (struct as_list *aslist, const char *reg_str,
enum as_filter_type type)
{
struct as_filter *asfilter;
@@ -158,7 +158,7 @@ as_list_filter_add (struct as_list *aslist, struct as_filter *asfilter)
/* Lookup as_list from list of as_list by name. */
struct as_list *
-as_list_lookup (char *name)
+as_list_lookup (const char *name)
{
struct as_list *aslist;
@@ -195,9 +195,9 @@ as_list_free (struct as_list *aslist)
/* Insert new AS list to list of as_list. Each as_list is sorted by
the name. */
struct as_list *
-as_list_insert (char *name)
+as_list_insert (const char *name)
{
- int i;
+ size_t i;
long number;
struct as_list *aslist;
struct as_list *point;
@@ -279,7 +279,7 @@ as_list_insert (char *name)
}
struct as_list *
-as_list_get (char *name)
+as_list_get (const char *name)
{
struct as_list *aslist;
@@ -296,7 +296,7 @@ as_list_get (char *name)
return aslist;
}
-static char *
+static const char *
filter_type_str (enum as_filter_type type)
{
switch (type)