The goto here really doesn't improve clarity or brevity at all. Use a clearer construct. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- tap.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tap.c b/tap.c index ae60fd4..eb00135 100644 --- a/tap.c +++ b/tap.c @@ -1239,18 +1239,13 @@ void tap_handler(struct ctx *c, int fd, uint32_t events, } if ((c->mode == MODE_PASST && tap_handler_passt(c, now)) || - (c->mode == MODE_PASTA && tap_handler_pasta(c, now))) - goto reinit; - - if (events & (EPOLLRDHUP | EPOLLHUP | EPOLLERR)) - goto reinit; + (c->mode == MODE_PASTA && tap_handler_pasta(c, now)) || + (events & (EPOLLRDHUP | EPOLLHUP | EPOLLERR))) { + if (c->one_off) { + info("Client closed connection, exiting"); + exit(EXIT_SUCCESS); + } - return; -reinit: - if (c->one_off) { - info("Client closed connection, exiting"); - exit(EXIT_SUCCESS); + tap_sock_init(c); } - - tap_sock_init(c); } -- 2.39.1