summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-09-09 21:08:19 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-09-09 21:08:19 +0000
commit1bd916412dc22ac7ef0e82d3e8be29e2430b947a (patch)
tree4b766bc8203896a99f4f1a55444bd7030affdb70
parent3301671de97cc01bd1d751c500157fd8a7bdb887 (diff)
downloadcoreutils-1bd916412dc22ac7ef0e82d3e8be29e2430b947a.tar.xz
(process_regexp): Store match length in regoff_t,
not int. Assume that negative return values less than -2 represent regoff_t overflow.
-rw-r--r--src/csplit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/csplit.c b/src/csplit.c
index 9bca37cd0..859ecd8e3 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -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;
}
}