From ce7e1778a64e7be539ccb9dc614a739e04d893a6 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 23 Jan 2017 15:12:38 +0100 Subject: [PATCH] bgpd: use a define for addpath string size The define is added in order to be reused, when one wants to display addpath identifier as a string with some comment. Signed-off-by: Philippe Guibert --- bgpd/bgp_debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index 1292de626d..e1e7cb1d5b 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -40,6 +40,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_updgrp.h" #include "bgpd/bgp_mplsvpn.h" +#define BGP_ADDPATH_STR 20 + unsigned long conf_bgp_debug_as4; unsigned long conf_bgp_debug_neighbor_events; unsigned long conf_bgp_debug_events; @@ -2095,7 +2097,7 @@ bgp_debug_rdpfxpath2str (struct prefix_rd *prd, union prefixconstptr pu, { char rd_buf[RD_ADDRSTRLEN]; char pfx_buf[PREFIX_STRLEN]; - char pathid_buf[20]; + char pathid_buf[BGP_ADDPATH_STR]; if (size < BGP_PRD_PATH_STRLEN) return NULL;