Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
Diffstat (limited to 'source/html.c')
| -rw-r--r-- | source/html.c | 5 |
1 file changed, 2 insertions, 3 deletions
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("</a>"); } -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)) |
