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 /lib/zclient.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 '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 4901c92743..96a78efad6 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; |
