From 0b8d00adaf980c87afdd45a6eea5b24d298b7dd8 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 17 Sep 2018 16:13:22 +0200 Subject: [PATCH] counters: Fix exit status in error case --- src/swanctl/commands/counters.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swanctl/commands/counters.c b/src/swanctl/commands/counters.c index ab386b5d8..909ca4366 100644 --- a/src/swanctl/commands/counters.c +++ b/src/swanctl/commands/counters.c @@ -48,7 +48,7 @@ static int counters(vici_conn_t *conn) vici_res_t *res; command_format_options_t format = COMMAND_FORMAT_NONE; char *arg, *name = NULL; - int ret; + int ret = 0; bool all = FALSE, reset = FALSE; while (TRUE) @@ -131,7 +131,7 @@ static int counters(vici_conn_t *conn) } } vici_free_res(res); - return 0; + return ret; } /**