summaryrefslogtreecommitdiff
path: root/pathd/path_cli.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2022-07-19 14:59:23 +0200
committerPhilippe Guibert <philippe.guibert@6wind.com>2022-11-14 17:42:55 +0100
commitc1657d2669cb8be9cd0d0b2e6d1c7080b63422a0 (patch)
tree356f6fa906604987521f35a7232c9051fa125d32 /pathd/path_cli.c
parent116f9b45ede641316ae2f0bf75bc87246b31fdf3 (diff)
pathd: use a define to store the the length of endpoint string
The endpoint string is a 46 byte length buffer. Use a single place to store the length of that buffer. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'pathd/path_cli.c')
-rw-r--r--pathd/path_cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c
index 7510f2ad05..b88453c68f 100644
--- a/pathd/path_cli.c
+++ b/pathd/path_cli.c
@@ -126,7 +126,7 @@ DEFPY(show_srte_policy,
ttable_rowseps(tt, 0, BOTTOM, true, '-');
RB_FOREACH (policy, srte_policy_head, &srte_policies) {
- char endpoint[46];
+ char endpoint[ENDPOINT_STR_LENGTH];
char binding_sid[16] = "-";
ipaddr2str(&policy->endpoint, endpoint, sizeof(endpoint));
@@ -173,7 +173,7 @@ DEFPY(show_srte_policy_detail,
vty_out(vty, "\n");
RB_FOREACH (policy, srte_policy_head, &srte_policies) {
struct srte_candidate *candidate;
- char endpoint[46];
+ char endpoint[ENDPOINT_STR_LENGTH];
char binding_sid[16] = "-";
char *segment_list_info;
static char undefined_info[] = "(undefined)";