about summary refs log tree commit diff stats
path: root/html.c
diff options
context:
space:
mode:
authorJohn Keeping2014-01-12 17:13:48 +0000
committerJason A. Donenfeld2014-01-12 20:15:55 +0100
commitfd31aa693077d0eea1b14a7f44ffe29503e2ad59 (patch)
tree52a07041e444885764db7001ef34fa44b42aa2ea /html.c
parenttests: add Valgrind support (diff)
downloadcgit-fd31aa693077d0eea1b14a7f44ffe29503e2ad59.tar.gz
cgit-fd31aa693077d0eea1b14a7f44ffe29503e2ad59.zip
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 (limited to 'html.c')
-rw-r--r--html.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/html.c b/html.c index 903d4b7..f0ee2d6 100644 --- a/html.c +++ b/html.c
@@ -41,8 +41,6 @@ static const char* url_escape_table[256] = {
41 "%fe", "%ff" 41 "%fe", "%ff"
42}; 42};
43 43
44static int htmlfd = STDOUT_FILENO;
45
46char *fmt(const char *format, ...) 44char *fmt(const char *format, ...)
47{ 45{
48 static char buf[8][1024]; 46 static char buf[8][1024];
@@ -77,7 +75,7 @@ char *fmtalloc(const char *format, ...)
77 75
78void html_raw(const char *data, size_t size) 76void html_raw(const char *data, size_t size)
79{ 77{
80 if (write(htmlfd, data, size) != size) 78 if (write(STDOUT_FILENO, data, size) != size)
81 die_errno("write error on html output"); 79 die_errno("write error on html output");
82} 80}
83 81