diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-03-20 13:19:12 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-03-20 17:49:13 +0100 |
commit | 665ce267d994f7feb090c0c695c8462ae2d87a50 (patch) | |
tree | 824c2f257b44bd71f2849d8095edd339f2b3d2dd | |
parent | 49d22d1256498c449b44a80901887bc58b67148c (diff) |
check write errors on the output stream after each feed
This will detect write errors sooner.
-rw-r--r-- | sfeed_atom.c | 1 | ||||
-rw-r--r-- | sfeed_html.c | 1 | ||||
-rw-r--r-- | sfeed_mbox.c | 1 | ||||
-rw-r--r-- | sfeed_plain.c | 1 | ||||
-rw-r--r-- | sfeed_twtxt.c | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/sfeed_atom.c b/sfeed_atom.c index 07c34cd..3ce5cf0 100644 --- a/sfeed_atom.c +++ b/sfeed_atom.c @@ -150,6 +150,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_html.c b/sfeed_html.c index f3cff2b..ce96687 100644 --- a/sfeed_html.c +++ b/sfeed_html.c @@ -119,6 +119,7 @@ main(int argc, char *argv[]) err(1, "fopen: %s", argv[i]); printfeed(fp, &feeds[i - 1]); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_mbox.c b/sfeed_mbox.c index 33c9ec6..30ac875 100644 --- a/sfeed_mbox.c +++ b/sfeed_mbox.c @@ -172,6 +172,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_plain.c b/sfeed_plain.c index c954eff..8b1f00f 100644 --- a/sfeed_plain.c +++ b/sfeed_plain.c @@ -78,6 +78,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } diff --git a/sfeed_twtxt.c b/sfeed_twtxt.c index 8514bd6..1d8ab36 100644 --- a/sfeed_twtxt.c +++ b/sfeed_twtxt.c @@ -63,6 +63,7 @@ main(int argc, char *argv[]) name = ((name = strrchr(argv[i], '/'))) ? name + 1 : argv[i]; printfeed(fp, name); checkfileerror(fp, argv[i], 'r'); + checkfileerror(stdout, "<stdout>", 'w'); fclose(fp); } } |