diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-06 23:01:42 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-12 19:57:05 +0100 |
commit | 8068a649a79409737dfa5235a84915b544d4fff7 (patch) | |
tree | 3c5dff3b68589522e502c66519140b6124de1a28 /zebra/zebra_ptm.c | |
parent | tests: add unit test for zlog (diff) | |
download | frr-8068a649a79409737dfa5235a84915b544d4fff7.tar.xz frr-8068a649a79409737dfa5235a84915b544d4fff7.zip |
zebra: dont return a status code in zapi handlers
All of the ZAPI message handlers return an integer that means different
things to each of them, but nobody ever reads these integers, so this is
technical debt that we can just eliminate outright.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_ptm.c')
-rw-r--r-- | zebra/zebra_ptm.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c index f6775fa0b..b0295d127 100644 --- a/zebra/zebra_ptm.c +++ b/zebra/zebra_ptm.c @@ -661,8 +661,8 @@ int zebra_ptm_sock_read(struct thread *thread) } /* BFD peer/dst register/update */ -int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length, - int command, struct zebra_vrf *zvrf) +void zebra_ptm_bfd_dst_register(struct zserv *client, u_short length, + int command, struct zebra_vrf *zvrf) { struct stream *s; struct prefix src_p; @@ -693,7 +693,7 @@ int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length, ptm_cb.t_timer = NULL; thread_add_timer(zebrad.master, zebra_ptm_connect, NULL, ptm_cb.reconnect_time, &ptm_cb.t_timer); - return -1; + return; } ptm_lib_init_msg(ptm_hdl, 0, PTMLIB_MSG_TYPE_CMD, NULL, &out_ctxt); @@ -816,16 +816,16 @@ int zebra_ptm_bfd_dst_register(struct zserv *client, u_short length, ptm_cb.out_data); zebra_ptm_send_message(ptm_cb.out_data, data_len); - return 0; + return; stream_failure: ptm_lib_cleanup_msg(ptm_hdl, out_ctxt); - return 0; + return; } /* BFD peer/dst deregister */ -int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length, - struct zebra_vrf *zvrf) +void zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length, + struct zebra_vrf *zvrf) { struct stream *s; struct prefix src_p; @@ -849,7 +849,7 @@ int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length, ptm_cb.t_timer = NULL; thread_add_timer(zebrad.master, zebra_ptm_connect, NULL, ptm_cb.reconnect_time, &ptm_cb.t_timer); - return -1; + return; } ptm_lib_init_msg(ptm_hdl, 0, PTMLIB_MSG_TYPE_CMD, NULL, &out_ctxt); @@ -948,15 +948,15 @@ int zebra_ptm_bfd_dst_deregister(struct zserv *client, u_short length, zebra_ptm_send_message(ptm_cb.out_data, data_len); - return 0; + return; stream_failure: ptm_lib_cleanup_msg(ptm_hdl, out_ctxt); - return 0; + return; } /* BFD client register */ -int zebra_ptm_bfd_client_register(struct zserv *client, u_short length) +void zebra_ptm_bfd_client_register(struct zserv *client, u_short length) { struct stream *s; unsigned int pid; @@ -977,7 +977,7 @@ int zebra_ptm_bfd_client_register(struct zserv *client, u_short length) ptm_cb.t_timer = NULL; thread_add_timer(zebrad.master, zebra_ptm_connect, NULL, ptm_cb.reconnect_time, &ptm_cb.t_timer); - return -1; + return; } ptm_lib_init_msg(ptm_hdl, 0, PTMLIB_MSG_TYPE_CMD, NULL, &out_ctxt); @@ -1003,7 +1003,7 @@ int zebra_ptm_bfd_client_register(struct zserv *client, u_short length) SET_FLAG(ptm_cb.client_flags[client->proto], ZEBRA_PTM_BFD_CLIENT_FLAG_REG); - return 0; + return; stream_failure: /* @@ -1013,7 +1013,7 @@ stream_failure: * if (out_ctxt) * ptm_lib_cleanup_msg(ptm_hdl, out_ctxt); */ - return 0; + return; } /* BFD client deregister */ |