1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-12 06:57:33 +02:00

(cut_fields): Invoke xalloc_die instead of printing our own message.

(cut_fields): Check for I/O error as well as end-of-file.
This commit is contained in:
Jim Meyering
2000-08-08 07:09:31 +00:00
parent 1899efe4f6
commit 8b6882e5e9

View File

@@ -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);