summaryrefslogtreecommitdiff
path: root/sfeed.c
diff options
context:
space:
mode:
Diffstat (limited to 'sfeed.c')
-rw-r--r--sfeed.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sfeed.c b/sfeed.c
index 4dd89c1..f2aa6b0 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -679,6 +679,9 @@ printfields(void)
putchar(FieldSeparator);
string_print_trimmed_multi(&ctx.fields[FeedFieldCategory].str);
putchar('\n');
+
+ if (ferror(stdout)) /* check for errors but do not flush */
+ checkfileerror(stdout, "<stdout>", 'w');
}
static int
@@ -1059,5 +1062,8 @@ main(int argc, char *argv[])
/* NOTE: getnext is defined in xml.h for inline optimization */
xml_parse(&parser);
+ checkfileerror(stdin, "<stdin>", 'r');
+ checkfileerror(stdout, "<stdout>", 'w');
+
return 0;
}