You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2015/04/10 20:13:22 UTC
trafficserver git commit: TS-3515: Removed error logging from Regex
and fixed an issue with erroring on pcre_study
Repository: trafficserver
Updated Branches:
refs/heads/master f09d06db8 -> 0cdda8a14
TS-3515: Removed error logging from Regex and fixed an issue with
erroring on pcre_study
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/0cdda8a1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/0cdda8a1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/0cdda8a1
Branch: refs/heads/master
Commit: 0cdda8a1467a34259973e7355a77388b969b3f1b
Parents: f09d06d
Author: Bryan Call <bc...@apache.org>
Authored: Fri Apr 10 10:59:21 2015 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Fri Apr 10 11:12:30 2015 -0700
----------------------------------------------------------------------
lib/ts/Regex.cc | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/0cdda8a1/lib/ts/Regex.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Regex.cc b/lib/ts/Regex.cc
index f267d24..916ca68 100644
--- a/lib/ts/Regex.cc
+++ b/lib/ts/Regex.cc
@@ -67,8 +67,7 @@ Regex::compile(const char *pattern, const unsigned flags)
}
regex = pcre_compile(pattern, options, &error, &erroffset, NULL);
- if (error || regex == NULL) {
- Error("pcre_compile failed pattern has error starting at: %s", error + erroffset);
+ if (error) {
regex = NULL;
return false;
}
@@ -78,10 +77,6 @@ Regex::compile(const char *pattern, const unsigned flags)
#endif
regex_extra = pcre_study(regex, study_opts, &error);
- if ((regex_extra == NULL) && (error != NULL)) {
- Error("pcre_study failed with error: %s", error);
- return false;
- }
#ifdef PCRE_CONFIG_JIT
if (regex_extra)
@@ -96,7 +91,6 @@ Regex::get_capture_count()
{
int captures = -1;
if (pcre_fullinfo(regex, regex_extra, PCRE_INFO_CAPTURECOUNT, &captures) != 0) {
- Error("pcre_fullinfo failed!");
return -1;
}