]> git.cameronkatri.com Git - cgit.git/commitdiff
html: remove redundant htmlfd variable
authorJohn Keeping <john@keeping.me.uk>
Sun, 12 Jan 2014 17:13:48 +0000 (17:13 +0000)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 12 Jan 2014 19:15:55 +0000 (20:15 +0100)
This is never changed from STDOUT_FILENO, so just use that value
directly.

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

diff --git a/html.c b/html.c
index 903d4b78d45584172d9291460109a7658dfa0055..f0ee2d6a2fd198771058ca085a879e7520cd7c50 100644 (file)
--- 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");
 }