all repos — cgit @ 1fec7cd6f817e52a6e55458d584a7a5092ba6aed

a hyperfast web frontend for git written in c

html.c: die when write fails

If we fail to write HTML output once, there's no point carrying on so
just write a failure message once and die.  By using Git's die_errno
function we also let the user know in what way the write failed.

Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Sat, 18 May 2013 15:57:03 +0100
commit

1fec7cd6f817e52a6e55458d584a7a5092ba6aed

parent

927060c5d8d82a9422fc1dcf6d1379d21071b158

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M html.chtml.c

@@ -78,7 +78,7 @@

void html_raw(const char *data, size_t size) { if (write(htmlfd, data, size) != size) - fprintf(stderr, "[html.c] html output truncated.\n"); + die_errno("write error on html output"); } void html(const char *txt)