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:
Donald Sharp 2022-09-20 07:32:22 -04:00 committed by GitHub
commit 0be32df16e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -983,7 +983,7 @@ struct attr *bgp_attr_aggregate_intern(
{
struct attr attr;
struct attr *new;
int ret;
route_map_result_t ret;
memset(&attr, 0, sizeof(attr));

View 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)