]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(process_regexp): Store match length in regoff_t,
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 9 Sep 2005 21:08:19 +0000 (21:08 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 9 Sep 2005 21:08:19 +0000 (21:08 +0000)
not int.  Assume that negative return values less than -2
represent regoff_t overflow.

src/csplit.c

index 9bca37cd0c199e1ede5aa781b5d7b9c05876c086..859ecd8e3fffddeed01082e72b0ca6b1216f67e7 100644 (file)
@@ -777,7 +777,7 @@ process_regexp (struct control *p, uintmax_t repetition)
   size_t line_len;             /* To make "$" in regexps work. */
   uintmax_t break_line;                /* First line number of next file. */
   bool ignore = p->ignore;     /* If true, skip this section. */
-  int ret;
+  regoff_t ret;
 
   if (!ignore)
     create_output_file ();
@@ -854,7 +854,7 @@ process_regexp (struct control *p, uintmax_t repetition)
              error (0, 0, _("error in regular expression search"));
              cleanup_fatal ();
            }
-         if (ret >= 0)
+         if (ret != -1)
            break;
        }
     }