This is an automated email from the ASF dual-hosted git repository.
dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 8e0845c0cf Records: Clean up - remove unreachable code. (#12633)
8e0845c0cf is described below
commit 8e0845c0cf36b21262ec530614ec16653c0990e7
Author: Damian Meden <[email protected]>
AuthorDate: Tue Nov 4 10:41:58 2025 +0100
Records: Clean up - remove unreachable code. (#12633)
---
src/records/RecUtils.cc | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/records/RecUtils.cc b/src/records/RecUtils.cc
index 65a3af6e00..5d1c63ba8e 100644
--- a/src/records/RecUtils.cc
+++ b/src/records/RecUtils.cc
@@ -384,15 +384,7 @@ bool
recordRegexCheck(const char *pattern, const char *value)
{
Regex regex;
-
- bool rval = regex.compile(pattern);
- if (rval == false) {
- return false;
- } else {
- return regex.exec(value);
- }
-
- return false; // no-op
+ return regex.compile(pattern) && regex.exec(value);
}
bool