summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-07-21 16:27:20 -0700
committerPaul Jakma <paul@quagga.net>2009-07-28 10:04:38 +0100
commit03621955d8ab0ea30024bd8fc83afda8e48db712 (patch)
tree0df6f032806430fdd7d70b5317779d146e9d6f58 /bgpd
parent78b31d5cf511c400d7f09158a3d8863f1bf63c2a (diff)
bgpd: peer action table static/const
bgpd.c: (various tables) only used in one place and are immutable.
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgpd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 60722d27..d910956c 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -2262,7 +2262,7 @@ struct peer_flag_action
u_char peer_down;
};
-struct peer_flag_action peer_flag_action_list[] =
+static const struct peer_flag_action peer_flag_action_list[] =
{
{ PEER_FLAG_PASSIVE, 0, peer_change_reset },
{ PEER_FLAG_SHUTDOWN, 0, peer_change_reset },
@@ -2274,7 +2274,7 @@ struct peer_flag_action peer_flag_action_list[] =
{ 0, 0, 0 }
};
-struct peer_flag_action peer_af_flag_action_list[] =
+static const struct peer_flag_action peer_af_flag_action_list[] =
{
{ PEER_FLAG_NEXTHOP_SELF, 1, peer_change_reset_out },
{ PEER_FLAG_SEND_COMMUNITY, 1, peer_change_reset_out },
@@ -2295,14 +2295,14 @@ struct peer_flag_action peer_af_flag_action_list[] =
/* Proper action set. */
static int
-peer_flag_action_set (struct peer_flag_action *action_list, int size,
+peer_flag_action_set (const struct peer_flag_action *action_list, int size,
struct peer_flag_action *action, u_int32_t flag)
{
int i;
int found = 0;
int reset_in = 0;
int reset_out = 0;
- struct peer_flag_action *match = NULL;
+ const struct peer_flag_action *match = NULL;
/* Check peer's frag action. */
for (i = 0; i < size; i++)