diff options
author | Jim Meyering <jim@meyering.net> | 2000-08-08 07:09:31 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-08-08 07:09:31 +0000 |
commit | 8b6882e5e94ae1c4d6dfd5e8d3cba0e9bafa5bfd (patch) | |
tree | 10e54402b26cca6390d70e3d315c6f0c6e694940 /src | |
parent | 1899efe4f6ccf2f346cabcad52da9e6082f4e550 (diff) | |
download | coreutils-8b6882e5e94ae1c4d6dfd5e8d3cba0e9bafa5bfd.tar.xz |
(cut_fields): Invoke xalloc_die instead of printing our own message.
(cut_fields): Check for I/O error as well as end-of-file.
Diffstat (limited to 'src')
-rw-r--r-- | src/cut.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -478,9 +478,9 @@ cut_fields (FILE *stream) delim, '\n', 0); if (len < 0) { - if (feof (stream)) + if (ferror (stream) || feof (stream)) break; - FATAL_ERROR (_("virtual memory exhausted")); + xalloc_die (); } assert (len != 0); |