mirror of
https://git.sr.ht/~sircmpwn/gmni
synced 2024-11-23 04:51:59 +01:00
gmni: use stdio to write body
Fixes https://todo.sr.ht/~sircmpwn/gmni/22
This commit is contained in:
parent
d754f34e7e
commit
5fd43e8d02
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user