counters: Fix exit status in error case
authorTobias Brunner <tobias@strongswan.org>
Mon, 17 Sep 2018 14:13:22 +0000 (16:13 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 17 Sep 2018 16:51:42 +0000 (18:51 +0200)
src/swanctl/commands/counters.c

index ab386b5..909ca43 100644 (file)
@@ -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;
 }
 
 /**