From abd78220e2c8d641f9d6fb09bd7d8974bdecb180 Mon Sep 17 00:00:00 2001 From: Dmytro Shytyi Date: Tue, 30 Jan 2024 13:38:26 +0100 Subject: [PATCH] lib: remove affinity map duplicate ASAN states that there is a duplicata in affinity map. Fix it by removing. Signed-off-by: Dmytro Shytyi --- lib/affinitymap.h | 1 - lib/affinitymap_cli.c | 22 ---------------------- mgmtd/mgmt_main.c | 2 +- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/lib/affinitymap.h b/lib/affinitymap.h index ebe2659bf7fc..a69a5028e1bf 100644 --- a/lib/affinitymap.h +++ b/lib/affinitymap.h @@ -58,7 +58,6 @@ struct affinity_maps { DECLARE_QOBJ_TYPE(affinity_maps); extern const struct frr_yang_module_info frr_affinity_map_info; -extern const struct frr_yang_module_info frr_affinity_map_cli_info; void affinity_map_set(const char *name, int pos); void affinity_map_unset(const char *name); diff --git a/lib/affinitymap_cli.c b/lib/affinitymap_cli.c index 73b91e775b7f..c9ca50b74ad0 100644 --- a/lib/affinitymap_cli.c +++ b/lib/affinitymap_cli.c @@ -66,28 +66,6 @@ DEFPY_YANG_NOSH(no_affinity_map, no_affinity_map_cmd, return nb_cli_apply_changes(vty, NULL); } -static void cli_show_affinity_map(struct vty *vty, const struct lyd_node *dnode, - bool show_defaults __attribute__((__unused__))) -{ - vty_out(vty, "affinity-map %s bit-position %u\n", - yang_dnode_get_string(dnode, "name"), - yang_dnode_get_uint16(dnode, "value")); -} - -const struct frr_yang_module_info frr_affinity_map_cli_info = { - .name = "frr-affinity-map", - .ignore_cfg_cbs = true, - .nodes = { - { - .xpath = "/frr-affinity-map:lib/affinity-maps/affinity-map", - .cbs.cli_show = cli_show_affinity_map, - }, - { - .xpath = NULL, - }, - } -}; - /* Initialization of affinity map vector. */ void affinity_map_init(void) { diff --git a/mgmtd/mgmt_main.c b/mgmtd/mgmt_main.c index cce16f51f604..b3ab070d2d95 100644 --- a/mgmtd/mgmt_main.c +++ b/mgmtd/mgmt_main.c @@ -174,7 +174,7 @@ static const struct frr_yang_module_info *const mgmt_yang_modules[] = { &frr_route_map_cli_info, &frr_routing_cli_info, &frr_vrf_cli_info, - &frr_affinity_map_cli_info, + &frr_affinity_map_info, /* mgmtd-only modules */ &ietf_netconf_with_defaults_info,