]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: server: fix indentation mess on idle connections
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Jan 2019 09:41:19 +0000 (10:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2019 18:06:43 +0000 (19:06 +0100)
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

index 5b95e83a0fe2c073c9ef6637f4ee5bf49e051f4e..af0069668e0df976d8d7074cf21664db94a89904 100644 (file)
@@ -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)
-                               goto err;
-                       srv->idle_task = calloc(global.nbthread, sizeof(*srv->idle_task));
-                       if (!srv->idle_task)
+               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;
-                       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: