]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: Remove unused function hlua_get_top_error_string
authorTim Duesterhus <tim@bastelstu.be>
Sat, 14 May 2022 20:15:28 +0000 (22:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 May 2022 09:40:33 +0000 (11:40 +0200)
This function has no prototype defined in a header and is not used in hlua.c
either, thus it can be safely removed. Found with -Wmissing-prototypes.

src/hlua.c

index ef967a51548f8fdc798d02e6a8d6e4b64f3b3b23..abe3556b6e6e888588e78d70091685bd364f7bfa 100644 (file)
@@ -498,16 +498,6 @@ __LJMP unsigned int hlua_checktable(lua_State *L, int argno)
        return luaL_ref(L, LUA_REGISTRYINDEX);
 }
 
-/* Return the string that is of the top of the stack. */
-const char *hlua_get_top_error_string(lua_State *L)
-{
-       if (lua_gettop(L) < 1)
-               return "unknown error";
-       if (lua_type(L, -1) != LUA_TSTRING)
-               return "unknown error";
-       return lua_tostring(L, -1);
-}
-
 __LJMP const char *hlua_traceback(lua_State *L, const char* sep)
 {
        lua_Debug ar;