From 15c120d251583301eaa118423c9d76e04424ea44 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 23 Jan 2019 10:41:19 +0100 Subject: [PATCH] CLEANUP: server: fix indentation mess on idle connections Apparently some code was moved around leaving the inner block incorrectly indented and with the closing brace in the middle of nowhere. --- src/server.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/server.c b/src/server.c index 5b95e83a0..af0069668 100644 --- a/src/server.c +++ b/src/server.c @@ -1944,23 +1944,23 @@ static int server_finalize_init(const char *file, int linenum, char **args, int srv_lb_commit_status(srv); if (srv->max_idle_conns != 0) { - int i; + int i; - srv->idle_orphan_conns = calloc(global.nbthread, sizeof(*srv->idle_orphan_conns)); - if (!srv->idle_orphan_conns) + srv->idle_orphan_conns = calloc(global.nbthread, sizeof(*srv->idle_orphan_conns)); + if (!srv->idle_orphan_conns) + goto err; + srv->idle_task = calloc(global.nbthread, sizeof(*srv->idle_task)); + if (!srv->idle_task) + goto err; + for (i = 0; i < global.nbthread; i++) { + LIST_INIT(&srv->idle_orphan_conns[i]); + srv->idle_task[i] = task_new(1 << i); + if (!srv->idle_task[i]) goto err; - srv->idle_task = calloc(global.nbthread, sizeof(*srv->idle_task)); - if (!srv->idle_task) - goto err; - for (i = 0; i < global.nbthread; i++) { - LIST_INIT(&srv->idle_orphan_conns[i]); - srv->idle_task[i] = task_new(1 << i); - if (!srv->idle_task[i]) - goto err; - srv->idle_task[i]->process = cleanup_idle_connections; - srv->idle_task[i]->context = srv; - } + srv->idle_task[i]->process = cleanup_idle_connections; + srv->idle_task[i]->context = srv; } + } return 0; err: