]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: lua: move comment
authorThierry FOURNIER / OZON.IO <thierry.fournier@ozon.io>
Sat, 12 Nov 2016 10:07:05 +0000 (11:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Nov 2016 14:23:17 +0000 (15:23 +0100)
Old comment is misplaced. Certainly due to a bad copy/paste

Must be backported in 1.6

src/hlua.c

index db023f58cbca319e9b381136ffa7d3bd56377750..5a1785de56e6cf6f96587848a74b5fec0ff07f8b 100644 (file)
@@ -6348,7 +6348,6 @@ __LJMP static int hlua_register_service(lua_State *L)
        /* Third argument : lua function. */
        ref = MAY_LJMP(hlua_checkfunction(L, 3));
 
-       /* Check required environment. Only accepted "http" or "tcp". */
        /* Allocate and fill the sample fetch keyword struct. */
        akl = calloc(1, sizeof(*akl) + sizeof(struct action_kw) * 2);
        if (!akl)
@@ -6376,6 +6375,7 @@ __LJMP static int hlua_register_service(lua_State *L)
 
        snprintf((char *)akl->kw[0].kw, len, "lua.%s", name);
 
+       /* Check required environment. Only accepted "http" or "tcp". */
        if (strcmp(env, "tcp") == 0)
                akl->kw[0].parse = action_register_service_tcp;
        else if (strcmp(env, "http") == 0)