]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
csplit could get a failed assertion: printf 'a\n\n'|csplit - '/^$/' 2
authorJim Meyering <jim@meyering.net>
Thu, 22 Nov 2001 09:01:39 +0000 (09:01 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 22 Nov 2001 09:01:39 +0000 (09:01 +0000)
No longer include assert.h.
(process_line_count): Remove invalid assertion.

src/csplit.c

index 7812e375a7b0e57990ca6685a4f42c9c0d027d61..adea98e63927e6b51fd22e7058d8ce2e29b7b2aa 100644 (file)
@@ -21,7 +21,6 @@
 #include <config.h>
 
 #include <stdio.h>
-#include <assert.h>
 #include <getopt.h>
 #include <sys/types.h>
 #include <signal.h>
@@ -769,12 +768,6 @@ process_line_count (const struct control *p, int repetition)
 
   linenum = get_first_line_in_buffer ();
 
-  /* Initially, I wanted to assert linenum < last_line_to_save, but that
-     condition is false for the valid command: echo | csplit - 1 '{*}'.
-     So, relax it just a little.  */
-  assert ((linenum == 1 && last_line_to_save == 1)
-         || linenum < last_line_to_save);
-
   while (linenum++ < last_line_to_save)
     {
       line = remove_line ();