mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 13:27:53 +00:00
Merge pull request #11971 from opensourcerouting/fix/coccinelle_route_map_apply
bgpd: Use route_map_result_t for route_map_apply() as return type
This commit is contained in:
commit
0be32df16e
@ -983,7 +983,7 @@ struct attr *bgp_attr_aggregate_intern(
|
|||||||
{
|
{
|
||||||
struct attr attr;
|
struct attr attr;
|
||||||
struct attr *new;
|
struct attr *new;
|
||||||
int ret;
|
route_map_result_t ret;
|
||||||
|
|
||||||
memset(&attr, 0, sizeof(attr));
|
memset(&attr, 0, sizeof(attr));
|
||||||
|
|
||||||
|
15
tools/coccinelle/route_map_apply.cocci
Normal file
15
tools/coccinelle/route_map_apply.cocci
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
@rmap@
|
||||||
|
identifier ret;
|
||||||
|
position p;
|
||||||
|
@@
|
||||||
|
|
||||||
|
int ret@p;
|
||||||
|
...
|
||||||
|
* ret = route_map_apply(...);
|
||||||
|
|
||||||
|
@script:python@
|
||||||
|
p << rmap.p;
|
||||||
|
@@
|
||||||
|
|
||||||
|
msg = "ERROR: Invalid type of return value variable for route_map_apply_ext()"
|
||||||
|
coccilib.report.print_report(p[0], msg)
|
Loading…
Reference in New Issue
Block a user