diff options
author | paul <paul> | 2004-10-13 05:06:08 +0000 |
---|---|---|
committer | paul <paul> | 2004-10-13 05:06:08 +0000 |
commit | fd79ac918b8feaacebe9719adaac97dffb69137a (patch) | |
tree | d0665eb68e60da9d6e364414cdb61830f19f33d3 /bgpd/bgp_community.c | |
parent | 39db97e4e02eae08a1e18528367b6e9b07eb6a93 (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_community.c')
-rw-r--r-- | bgpd/bgp_community.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c index 54679710..1a6514bc 100644 --- a/bgpd/bgp_community.c +++ b/bgpd/bgp_community.c @@ -401,7 +401,7 @@ community_hash_make (struct community *com) } int -community_match (struct community *com1, struct community *com2) +community_match (const struct community *com1, const struct community *com2) { int i = 0; int j = 0; @@ -432,7 +432,7 @@ community_match (struct community *com1, struct community *com2) /* If two aspath have same value then return 1 else return 0. This function is used by hash package. */ int -community_cmp (struct community *com1, struct community *com2) +community_cmp (const struct community *com1, const struct community *com2) { if (com1 == NULL && com2 == NULL) return 1; @@ -472,10 +472,11 @@ enum community_token }; /* Get next community token from string. */ -char * -community_gettoken (char *buf, enum community_token *token, u_int32_t *val) +const char * +community_gettoken (const char *buf, enum community_token *token, + u_int32_t *val) { - char *p = buf; + const char *p = buf; /* Skip white space. */ while (isspace ((int) *p)) @@ -570,7 +571,7 @@ community_gettoken (char *buf, enum community_token *token, u_int32_t *val) /* convert string to community structure */ struct community * -community_str2com (char *str) +community_str2com (const char *str) { struct community *com = NULL; struct community *com_sort = NULL; |