diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-15 07:26:00 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-01-25 20:14:38 -0500 |
| commit | e677d1094573649dcea181dad91bf0d0fb40726a (patch) | |
| tree | b8d019192e761045eeaaacf3c8687f3254915c8d | |
| parent | d57e451387215a2667e07f691494694d14dd5132 (diff) | |
zebra: Having one goto in a function to just return is silly
Just return right there, goto's are useful if you have common
code that needs to be cleaned up before exiting this function,
of which this function has none and there is only one goto.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | zebra/rt_socket.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index abcff22b6b..9cc2efb3e9 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -308,8 +308,7 @@ enum zebra_dplane_result kernel_route_update(struct zebra_dplane_ctx *ctx) if (dplane_ctx_get_src(ctx) != NULL) { zlog_err("route add: IPv6 sourcedest routes unsupported!"); - res = ZEBRA_DPLANE_REQUEST_FAILURE; - goto done; + return ZEBRA_DPLANE_REQUEST_FAILURE; } frr_elevate_privs(&zserv_privs) { @@ -341,8 +340,6 @@ enum zebra_dplane_result kernel_route_update(struct zebra_dplane_ctx *ctx) } } /* Elevated privs */ -done: - return res; } |
