summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-11-29 14:37:23 -0500
committerChristian Hopps <chopps@labn.net>2023-11-29 14:37:23 -0500
commit2c01083d35263fb3121340cc01f3b545075ae8e6 (patch)
tree9e0aa21dd96e59c7c4cbd24bd6b3f97f01deb75b /ripngd
parent4aff978cee928cc0f8e1bf68a10d9c6ebb4b270e (diff)
lib: all: remove './' from xpath 22% speedup
fixes #8299 Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_cli.c26
-rw-r--r--ripngd/ripng_nb_config.c12
2 files changed, 19 insertions, 19 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c
index 9a96e29313..88b9354d95 100644
--- a/ripngd/ripng_cli.c
+++ b/ripngd/ripng_cli.c
@@ -73,7 +73,7 @@ void cli_show_router_ripng(struct vty *vty, const struct lyd_node *dnode,
{
const char *vrf_name;
- vrf_name = yang_dnode_get_string(dnode, "./vrf");
+ vrf_name = yang_dnode_get_string(dnode, "vrf");
vty_out(vty, "!\n");
vty_out(vty, "router ripng");
@@ -267,12 +267,12 @@ void cli_show_ripng_offset_list(struct vty *vty, const struct lyd_node *dnode,
{
const char *interface;
- interface = yang_dnode_get_string(dnode, "./interface");
+ interface = yang_dnode_get_string(dnode, "interface");
vty_out(vty, " offset-list %s %s %s",
- yang_dnode_get_string(dnode, "./access-list"),
- yang_dnode_get_string(dnode, "./direction"),
- yang_dnode_get_string(dnode, "./metric"));
+ yang_dnode_get_string(dnode, "access-list"),
+ yang_dnode_get_string(dnode, "direction"),
+ yang_dnode_get_string(dnode, "metric"));
if (!strmatch(interface, "*"))
vty_out(vty, " %s", interface);
vty_out(vty, "\n");
@@ -335,13 +335,13 @@ void cli_show_ripng_redistribute(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " redistribute %s",
- yang_dnode_get_string(dnode, "./protocol"));
- if (yang_dnode_exists(dnode, "./metric"))
+ yang_dnode_get_string(dnode, "protocol"));
+ if (yang_dnode_exists(dnode, "metric"))
vty_out(vty, " metric %s",
- yang_dnode_get_string(dnode, "./metric"));
- if (yang_dnode_exists(dnode, "./route-map"))
+ yang_dnode_get_string(dnode, "metric"));
+ if (yang_dnode_exists(dnode, "route-map"))
vty_out(vty, " route-map %s",
- yang_dnode_get_string(dnode, "./route-map"));
+ yang_dnode_get_string(dnode, "route-map"));
vty_out(vty, "\n");
}
@@ -435,9 +435,9 @@ void cli_show_ripng_timers(struct vty *vty, const struct lyd_node *dnode,
bool show_defaults)
{
vty_out(vty, " timers basic %s %s %s\n",
- yang_dnode_get_string(dnode, "./update-interval"),
- yang_dnode_get_string(dnode, "./holddown-interval"),
- yang_dnode_get_string(dnode, "./flush-interval"));
+ yang_dnode_get_string(dnode, "update-interval"),
+ yang_dnode_get_string(dnode, "holddown-interval"),
+ yang_dnode_get_string(dnode, "flush-interval"));
}
/*
diff --git a/ripngd/ripng_nb_config.c b/ripngd/ripng_nb_config.c
index 0b1bd68eca..6ce1c1e356 100644
--- a/ripngd/ripng_nb_config.c
+++ b/ripngd/ripng_nb_config.c
@@ -35,7 +35,7 @@ int ripngd_instance_create(struct nb_cb_create_args *args)
const char *vrf_name;
int socket;
- vrf_name = yang_dnode_get_string(args->dnode, "./vrf");
+ vrf_name = yang_dnode_get_string(args->dnode, "vrf");
vrf = vrf_lookup_by_name(vrf_name);
/*
@@ -262,7 +262,7 @@ int ripngd_instance_offset_list_create(struct nb_cb_create_args *args)
return NB_OK;
ripng = nb_running_get_entry(args->dnode, NULL, true);
- ifname = yang_dnode_get_string(args->dnode, "./interface");
+ ifname = yang_dnode_get_string(args->dnode, "interface");
offset = ripng_offset_list_new(ripng, ifname);
nb_running_set_entry(args->dnode, offset);
@@ -278,7 +278,7 @@ int ripngd_instance_offset_list_destroy(struct nb_cb_destroy_args *args)
if (args->event != NB_EV_APPLY)
return NB_OK;
- direct = yang_dnode_get_enum(args->dnode, "./direction");
+ direct = yang_dnode_get_enum(args->dnode, "direction");
offset = nb_running_unset_entry(args->dnode);
if (offset->direct[direct].alist_name) {
@@ -380,7 +380,7 @@ int ripngd_instance_redistribute_create(struct nb_cb_create_args *args)
return NB_OK;
ripng = nb_running_get_entry(args->dnode, NULL, true);
- type = yang_dnode_get_enum(args->dnode, "./protocol");
+ type = yang_dnode_get_enum(args->dnode, "protocol");
ripng->redist[type].enabled = true;
@@ -396,7 +396,7 @@ int ripngd_instance_redistribute_destroy(struct nb_cb_destroy_args *args)
return NB_OK;
ripng = nb_running_get_entry(args->dnode, NULL, true);
- type = yang_dnode_get_enum(args->dnode, "./protocol");
+ type = yang_dnode_get_enum(args->dnode, "protocol");
ripng->redist[type].enabled = false;
if (ripng->redist[type].route_map.name) {
@@ -420,7 +420,7 @@ void ripngd_instance_redistribute_apply_finish(
int type;
ripng = nb_running_get_entry(args->dnode, NULL, true);
- type = yang_dnode_get_enum(args->dnode, "./protocol");
+ type = yang_dnode_get_enum(args->dnode, "protocol");
if (ripng->enabled)
ripng_redistribute_conf_update(ripng, type);