Skip to content

Commit

Permalink
lib: remove affinity map duplicate
Browse files Browse the repository at this point in the history
ASAN states that there is a duplicata in affinity map.
Fix it by removing.

Signed-off-by: Dmytro Shytyi <[email protected]>
  • Loading branch information
dmytroshytyi-6WIND authored and louis-6wind committed Feb 7, 2024
1 parent 285551d commit abd7822
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
1 change: 0 additions & 1 deletion lib/affinitymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
22 changes: 0 additions & 22 deletions lib/affinitymap_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion mgmtd/mgmt_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit abd7822

Please sign in to comment.