diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-03 21:42:59 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-03 22:57:35 +0200 |
commit | 121f9dee7ce9f1b1b8a81f8bd97eed39ed87b477 (patch) | |
tree | 96db220e5aa1f111be363aafe8f5264a19970fed /lib/zclient.c | |
parent | lib: define ZAPI_CALLBACK_ARGS macro (diff) | |
download | frr-121f9dee7ce9f1b1b8a81f8bd97eed39ed87b477.tar.xz frr-121f9dee7ce9f1b1b8a81f8bd97eed39ed87b477.zip |
*: 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 'lib/zclient.c')
-rw-r--r-- | lib/zclient.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index 4901c9274..96a78efad 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -2371,9 +2371,7 @@ int zebra_send_pw(struct zclient *zclient, int command, struct zapi_pw *pw) /* * Receive PW status update from Zebra and send it to LDE process. */ -void zebra_read_pw_status_update(int command, struct zclient *zclient, - zebra_size_t length, vrf_id_t vrf_id, - struct zapi_pw_status *pw) +void zebra_read_pw_status_update(ZAPI_CALLBACK_ARGS, struct zapi_pw_status *pw) { struct stream *s; @@ -2386,8 +2384,7 @@ void zebra_read_pw_status_update(int command, struct zclient *zclient, pw->status = stream_getl(s); } -static void zclient_capability_decode(int command, struct zclient *zclient, - zebra_size_t length, vrf_id_t vrf_id) +static void zclient_capability_decode(ZAPI_CALLBACK_ARGS) { struct zclient_capabilities cap; struct stream *s = zclient->ibuf; |