diff options
author | Jim Meyering <jim@meyering.net> | 1993-03-30 03:32:10 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-03-30 03:32:10 +0000 |
commit | 56b1029ccf7a129fea7ea33817a5f8dc1037707f (patch) | |
tree | af59f74eb2a1bc22717ea8e99ac809f663647b3a /src/expand.c | |
parent | 86a2a3f5f6901c33c46b6900eda6e76d2944b6c7 (diff) | |
download | coreutils-56b1029ccf7a129fea7ea33817a5f8dc1037707f.tar.xz |
Always call error with errno (not zero) after failed fclose or non-zero ferror.
Diffstat (limited to 'src/expand.c')
-rw-r--r-- | src/expand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expand.c b/src/expand.c index 17d215b43..36d8e05c4 100644 --- a/src/expand.c +++ b/src/expand.c @@ -162,7 +162,7 @@ main (argc, argv) if (have_read_stdin && fclose (stdin) == EOF) error (1, errno, "-"); if (ferror (stdout) || fclose (stdout) == EOF) - error (1, 0, "write error"); + error (1, errno, "write error"); exit (exit_status); } |