summaryrefslogtreecommitdiff
path: root/src/nl.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-03-30 03:32:10 +0000
committerJim Meyering <jim@meyering.net>1993-03-30 03:32:10 +0000
commit56b1029ccf7a129fea7ea33817a5f8dc1037707f (patch)
treeaf59f74eb2a1bc22717ea8e99ac809f663647b3a /src/nl.c
parent86a2a3f5f6901c33c46b6900eda6e76d2944b6c7 (diff)
downloadcoreutils-56b1029ccf7a129fea7ea33817a5f8dc1037707f.tar.xz
Always call error with errno (not zero) after failed fclose or non-zero ferror.
Diffstat (limited to 'src/nl.c')
-rw-r--r--src/nl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nl.c b/src/nl.c
index 233a6f26a..d71aa70d5 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -293,7 +293,7 @@ main (argc, argv)
exit_status = 1;
}
if (ferror (stdout) || fclose (stdout) == EOF)
- error (1, 0, "write error");
+ error (1, errno, "write error");
exit (exit_status);
}