From 574ebc1b312cd11a5b276365aaa55ca0d0d29dfb Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Mon, 5 Feb 2024 17:11:47 +0100 Subject: [PATCH] bgpd: do not init labels in extra No need to init labels at extra allocation. num_labels is the number of set labels in label[] and is initialized to 0 by default. Signed-off-by: Louis Scalbert --- bgpd/bgp_route.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 01695ac4ee0e..b64babe22e10 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -195,8 +195,6 @@ static struct bgp_path_info_extra *bgp_path_info_extra_new(void) struct bgp_path_info_extra *new; new = XCALLOC(MTYPE_BGP_ROUTE_EXTRA, sizeof(struct bgp_path_info_extra)); - new->label[0] = MPLS_INVALID_LABEL; - new->num_labels = 0; new->flowspec = NULL; return new; }