neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit fd31aa693077d0eea1b14a7f44ffe29503e2ad59
parent 1b1974c45e5e23e5527aa43c4d9ece423a13dfdc
Author: John Keeping <john@keeping.me.uk>
Date:   Sun, 12 Jan 2014 17:13:48 +0000

html: remove redundant htmlfd variable

This is never changed from STDOUT_FILENO, so just use that value
directly.

Signed-off-by: John Keeping <john@keeping.me.uk>

Diffstat:
Mhtml.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/html.c b/html.c @@ -41,8 +41,6 @@ static const char* url_escape_table[256] = { "%fe", "%ff" }; -static int htmlfd = STDOUT_FILENO; - char *fmt(const char *format, ...) { static char buf[8][1024]; @@ -77,7 +75,7 @@ char *fmtalloc(const char *format, ...) void html_raw(const char *data, size_t size) { - if (write(htmlfd, data, size) != size) + if (write(STDOUT_FILENO, data, size) != size) die_errno("write error on html output"); }