1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-02 02:54:28 +02:00

uniq: be more specific when diagnosing read errors

* src/uniq.c (check_file): Use the errno when diagnosing read errors.
This commit is contained in:
Pádraig Brady
2023-04-26 15:20:47 +01:00
parent b16553cdad
commit 4eb5abbff4

View File

@@ -459,7 +459,7 @@ check_file (char const *infile, char const *outfile, char delimiter)
closefiles:
if (ferror (stdin) || fclose (stdin) != 0)
die (EXIT_FAILURE, 0, _("error reading %s"), quoteaf (infile));
die (EXIT_FAILURE, errno, _("error reading %s"), quoteaf (infile));
/* stdout is handled via the atexit-invoked close_stdout function. */