mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 14:17:20 +00:00
Merge pull request #4352 from donaldsharp/routemap_fix_replace
lib: Fix gcc 9.1 and --enable-werror issues found
This commit is contained in:
commit
4ce7e912ce
@ -906,6 +906,8 @@ static const char *route_map_type_str(enum route_map_type type)
|
|||||||
return "";
|
return "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
static int route_map_empty(struct route_map *map)
|
static int route_map_empty(struct route_map *map)
|
||||||
@ -1287,7 +1289,6 @@ int route_map_add_match(struct route_map_index *index, const char *match_name,
|
|||||||
struct route_map_rule *next;
|
struct route_map_rule *next;
|
||||||
struct route_map_rule_cmd *cmd;
|
struct route_map_rule_cmd *cmd;
|
||||||
void *compile;
|
void *compile;
|
||||||
int replaced = 0;
|
|
||||||
|
|
||||||
/* First lookup rule for add match statement. */
|
/* First lookup rule for add match statement. */
|
||||||
cmd = route_map_lookup_match(match_name);
|
cmd = route_map_lookup_match(match_name);
|
||||||
@ -1317,7 +1318,6 @@ int route_map_add_match(struct route_map_index *index, const char *match_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
route_map_rule_delete(&index->match_list, rule);
|
route_map_rule_delete(&index->match_list, rule);
|
||||||
replaced = 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1379,7 +1379,6 @@ int route_map_add_set(struct route_map_index *index, const char *set_name,
|
|||||||
struct route_map_rule *next;
|
struct route_map_rule *next;
|
||||||
struct route_map_rule_cmd *cmd;
|
struct route_map_rule_cmd *cmd;
|
||||||
void *compile;
|
void *compile;
|
||||||
int replaced = 0;
|
|
||||||
|
|
||||||
cmd = route_map_lookup_set(set_name);
|
cmd = route_map_lookup_set(set_name);
|
||||||
if (cmd == NULL)
|
if (cmd == NULL)
|
||||||
@ -1398,10 +1397,8 @@ int route_map_add_set(struct route_map_index *index, const char *set_name,
|
|||||||
route_map_index. */
|
route_map_index. */
|
||||||
for (rule = index->set_list.head; rule; rule = next) {
|
for (rule = index->set_list.head; rule; rule = next) {
|
||||||
next = rule->next;
|
next = rule->next;
|
||||||
if (rule->cmd == cmd) {
|
if (rule->cmd == cmd)
|
||||||
route_map_rule_delete(&index->set_list, rule);
|
route_map_rule_delete(&index->set_list, rule);
|
||||||
replaced = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add new route map match rule. */
|
/* Add new route map match rule. */
|
||||||
|
Loading…
Reference in New Issue
Block a user