summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-04-19 15:17:02 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2015-04-21 10:18:01 +0200
commitb1672ce858cc9c16fd7cc67b673aa241d9583a59 (patch)
treebf7a76931a2dac5cb741f456f808f7d8ef012c01 /bgpd
parentab90fc04a57b7b1d93ccddb8c9fbbf339a7ffc4c (diff)
downloadquagga-b1672ce858cc9c16fd7cc67b673aa241d9583a59.tar.bz2
quagga-b1672ce858cc9c16fd7cc67b673aa241d9583a59.tar.xz
bgpd: fix ecommunity_token initialiser
This pulls up ecommunity_token_unknown to be the first enum value (at 0), and uses that as initialiser to get rid of the uninitialised use warning. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_ecommunity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c
index 482e76b7..04957d41 100644
--- a/bgpd/bgp_ecommunity.c
+++ b/bgpd/bgp_ecommunity.c
@@ -281,10 +281,10 @@ ecommunity_finish (void)
/* Extended Communities token enum. */
enum ecommunity_token
{
+ ecommunity_token_unknown = 0,
ecommunity_token_rt,
ecommunity_token_soo,
ecommunity_token_val,
- ecommunity_token_unknown
};
/* Get next Extended Communities token from the string. */
@@ -511,7 +511,7 @@ struct ecommunity *
ecommunity_str2com (const char *str, int type, int keyword_included)
{
struct ecommunity *ecom = NULL;
- enum ecommunity_token token;
+ enum ecommunity_token token = ecommunity_token_unknown;
struct ecommunity_val eval;
int keyword = 0;