Skip to content

Commit

Permalink
bgpd: do not init labels in extra
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
louis-6wind committed Feb 6, 2024
1 parent c86d80b commit 2b2a40d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2b2a40d

Please sign in to comment.