From: Jim Meyering Date: Tue, 8 Aug 2000 07:09:31 +0000 (+0000) Subject: (cut_fields): Invoke xalloc_die instead of printing our own message. X-Git-Tag: FILEUTILS-4_0y~77 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=8b6882e5e94ae1c4d6dfd5e8d3cba0e9bafa5bfd;p=thirdparty%2Fcoreutils.git (cut_fields): Invoke xalloc_die instead of printing our own message. (cut_fields): Check for I/O error as well as end-of-file. --- diff --git a/src/cut.c b/src/cut.c index 45199c1255..2c298ec71e 100644 --- a/src/cut.c +++ b/src/cut.c @@ -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);