summaryrefslogtreecommitdiff
path: root/src/swanctl/commands/list_pools.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/swanctl/commands/list_pools.c')
-rw-r--r--src/swanctl/commands/list_pools.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/swanctl/commands/list_pools.c b/src/swanctl/commands/list_pools.c
index 17ea539a9..155771657 100644
--- a/src/swanctl/commands/list_pools.c
+++ b/src/swanctl/commands/list_pools.c
@@ -68,8 +68,9 @@ static int list_pools(vici_conn_t *conn)
res = vici_submit(req, conn);
if (!res)
{
+ ret = errno;
fprintf(stderr, "get-pools request failed: %s\n", strerror(errno));
- return errno;
+ return ret;
}
if (format & COMMAND_FORMAT_RAW)
{