- if (ferror (stdout))
- {
- if (file_name)
- error (status, 0, _("%s: write error"), file_name);
- else
- error (status, 0, _("write error"));
- }
+ /* If the stream's error bit is clear and there is nothing to flush,
+ then return right away. */
+ if (e && __fpending (stdout) == 0)
+ return;