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/html.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/html.c') diff --git a/source/html.c b/source/html.c index ec82ff4..48f7a88 100644 --- a/source/html.c +++ b/source/html.c @@ -524,7 +524,7 @@ void html_link_close(void) html(""); } -int html_include(const char *filename) +void html_include(const char *filename) { FILE *f; char buf[4096]; @@ -532,12 +532,11 @@ int html_include(const char *filename) if (!(f = fopen(filename, "r"))) { fprintf(stderr, "[cgit] Unable to include %s: %s (%d)\n", filename, strerror(errno), errno); - return -1; + return; } while ((len = fread(buf, 1, sizeof(buf), f)) > 0) html_raw(buf, len); fclose(f); - return 0; } void http_parse_querystring(const char *txt, void (*fn)(const char *name, const char *value)) -- cgit