cgmnlm

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/cgmnlm.git
Log | Files | Refs | README | LICENSE

commit 5fd43e8d02ffea38b5e4a3531e366f2b9b510201
parent d754f34e7eb5f700b6de13c6c4692837d0a123f4
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Thu, 24 Sep 2020 01:52:23 -0400

gmni: use stdio to write body

Fixes https://todo.sr.ht/~sircmpwn/gmni/22

Diffstat:
Msrc/gmni.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gmni.c b/src/gmni.c @@ -315,8 +315,8 @@ main(int argc, char *argv[]) } ssize_t w = 0; while (w < (ssize_t)n) { - ssize_t x = write(STDOUT_FILENO, &buf[w], n - w); - if (x == -1) { + ssize_t x = fwrite(&buf[w], 1, n - w, stdout); + if (ferror(stdout)) { fprintf(stderr, "Error: write: %s\n", strerror(errno)); return 1;