]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
.
authorJim Meyering <jim@meyering.net>
Wed, 26 Jan 1994 18:51:44 +0000 (18:51 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 26 Jan 1994 18:51:44 +0000 (18:51 +0000)
src/csplit.c
src/unexpand.c

index 54bd498d782c7d24ab7bdb67eee97f63e40ee0ca..ad13b2645bec4f9c4370c3aa728f5eeba6c0235b 100644 (file)
@@ -609,7 +609,7 @@ load_buffer ()
       b->bytes_used += (unsigned) read_input (p, bytes_avail);
 
       lines_found = record_line_starts (b);
-      bytes_wanted = b->bytes_alloc + INCR_SIZE;
+      bytes_wanted = b->bytes_alloc * 2;
       if (!lines_found)
        free_buffer (b);
     }
index 12762e35442205ed155e640f15593fe17b2d41a7..6c3a5277642f9cbb27db82b1bdb66ced3901d09e 100644 (file)
@@ -282,6 +282,9 @@ unexpand ()
   int pending = 0;             /* Pending columns of blanks. */
 
   fp = next_file ((FILE *) NULL);
+  if (fp == NULL)
+    return;
+
   for (;;)
     {
       c = getc (fp);