diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-03 19:42:59 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-03 20:57:35 +0000 | 
| commit | 121f9dee7ce9f1b1b8a81f8bd97eed39ed87b477 (patch) | |
| tree | 96db220e5aa1f111be363aafe8f5264a19970fed /ripngd/ripng_zebra.c | |
| parent | 6c33ca975ab61a869cc70fa64c0a10bcc6bc1e0d (diff) | |
*: use ZAPI_CALLBACK_ARGS macro for zapi handlers
This macro:
- Marks ZAPI callbacks for readability
- Standardizes argument names
- Makes it simple to add ZAPI arguments in the future
- Ensures proper types
- Looks better
- Shortens function declarations
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ripngd/ripng_zebra.c')
| -rw-r--r-- | ripngd/ripng_zebra.c | 5 | 
1 files changed, 2 insertions, 3 deletions
diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index cf60de2de9..a557a90c82 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -113,8 +113,7 @@ void ripng_zebra_ipv6_delete(struct ripng *ripng, struct agg_node *rp)  }  /* Zebra route add and delete treatment. */ -static int ripng_zebra_read_route(int command, struct zclient *zclient, -				  zebra_size_t length, vrf_id_t vrf_id) +static int ripng_zebra_read_route(ZAPI_CALLBACK_ARGS)  {  	struct ripng *ripng;  	struct zapi_route api; @@ -138,7 +137,7 @@ static int ripng_zebra_read_route(int command, struct zclient *zclient,  	nexthop = api.nexthops[0].gate.ipv6;  	ifindex = api.nexthops[0].ifindex; -	if (command == ZEBRA_REDISTRIBUTE_ROUTE_ADD) +	if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD)  		ripng_redistribute_add(ripng, api.type,  				       RIPNG_ROUTE_REDISTRIBUTE,  				       (struct prefix_ipv6 *)&api.prefix,  | 
