From a42dd735e18bb14ab44faac7434ddff428d13d24 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:56:09 -0700 Subject: Return nothing from html_include No caller reads the result, and a void html_include fits the Lua binding's callback as it is, so the wrapper that dropped it goes too. --- source/filter.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'source/filter.c') diff --git a/source/filter.c b/source/filter.c index 367074f..c33e9bc 100644 --- a/source/filter.c +++ b/source/filter.c @@ -263,19 +263,9 @@ static int script_html_url_arg(lua_State *lua_state) return emit_unfiltered(lua_state, html_url_arg); } -/* - * html_include returns whether it found the file, and calling it through a - * pointer that claims it returns nothing would be undefined, so the result is - * dropped in a wrapper of the right shape. - */ -static void include_and_discard_result(const char *filename) -{ - html_include(filename); -} - static int script_html_include(lua_State *lua_state) { - return emit_unfiltered(lua_state, include_and_discard_result); + return emit_unfiltered(lua_state, html_include); } static const struct { -- cgit