summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-15 09:59:51 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-15 09:59:51 -0700
commit5fc8ce3e00323facc86ae7abf418d0c9cb0f36d6 (patch)
tree12b79c5d5fb8fbde624bd314c0805ef691e4b52d
parenta8f66d84120f54b95a03ebe7b15aef63b644cda2 (diff)
downloadquagga-5fc8ce3e00323facc86ae7abf418d0c9cb0f36d6.tar.bz2
quagga-5fc8ce3e00323facc86ae7abf418d0c9cb0f36d6.tar.xz
BGP make attribute variables local
Message lists can be read-only, and hash tables are local to this code.
-rw-r--r--bgpd/bgp_attr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index ed1e72b3..8e270954 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -39,7 +39,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "bgpd/bgp_ecommunity.h"
/* Attribute strings for logging. */
-static struct message attr_str [] =
+static const struct message attr_str [] =
{
{ BGP_ATTR_ORIGIN, "ORIGIN" },
{ BGP_ATTR_AS_PATH, "AS_PATH" },
@@ -61,9 +61,9 @@ static struct message attr_str [] =
{ BGP_ATTR_AS4_AGGREGATOR, "AS4_AGGREGATOR" },
{ BGP_ATTR_AS_PATHLIMIT, "AS_PATHLIMIT" },
};
-int attr_str_max = sizeof(attr_str)/sizeof(attr_str[0]);
+static const int attr_str_max = sizeof(attr_str)/sizeof(attr_str[0]);
-struct hash *cluster_hash;
+static struct hash *cluster_hash;
static void *
cluster_hash_alloc (void *p)
@@ -202,7 +202,7 @@ cluster_init (void)
}
/* Unknown transit attribute. */
-struct hash *transit_hash;
+static struct hash *transit_hash;
static void
transit_free (struct transit *transit)
@@ -282,7 +282,7 @@ transit_init (void)
}
/* Attribute hash routines. */
-struct hash *attrhash;
+static struct hash *attrhash;
static struct attr_extra *
bgp_attr_extra_new (void)