From: Stephen Hemminger Date: Fri, 15 May 2009 17:16:34 +0000 (-0700) Subject: [BGP/cleanup] make message list in bgp_open const X-Git-Tag: frr-2.0-rc1~2289 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8f5abac1c3f5ad18561cad560bd42b50d2419d94;p=matthieu%2Ffrr.git [BGP/cleanup] make message list in bgp_open const --- diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 540edad0ef..37595817e9 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -194,20 +194,22 @@ bgp_capability_orf_not_support (struct peer *peer, afi_t afi, safi_t safi, peer->host, afi, safi, type, mode); } -static struct message orf_type_str[] = +static const struct message orf_type_str[] = { { ORF_TYPE_PREFIX, "Prefixlist" }, { ORF_TYPE_PREFIX_OLD, "Prefixlist (old)" }, }; -static int orf_type_str_max = sizeof(orf_type_str)/sizeof(orf_type_str[0]); +static const int orf_type_str_max + = sizeof(orf_type_str)/sizeof(orf_type_str[0]); -static struct message orf_mode_str[] = +static const struct message orf_mode_str[] = { { ORF_MODE_RECEIVE, "Receive" }, { ORF_MODE_SEND, "Send" }, { ORF_MODE_BOTH, "Both" }, }; -static int orf_mode_str_max = sizeof(orf_mode_str)/sizeof(orf_mode_str[0]); +static const int orf_mode_str_max + = sizeof(orf_mode_str)/sizeof(orf_mode_str[0]); static int bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr)