[PATCH 1/6] html: remove redundant htmlfd variable

John Keeping john at keeping.me.uk
Sun Jan 12 18:13:48 CET 2014


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

Signed-off-by: John Keeping <john at keeping.me.uk>
---
 html.c | 4 +---
 1 file changed, 1 insertion(+), 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] = {
 	"%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");
 }
 
-- 
1.8.5.226.g0d60d77



More information about the CGit mailing list