mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
use if-else in ReDoSUtil::getCanonicalizationFlags
Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
This commit is contained in:
committed by
GitHub
parent
f5a1a12435
commit
75a3f34e86
@@ -187,11 +187,10 @@ private predicate isCanonicalTerm(RelevantRegExpTerm term, string str) {
|
||||
string getCanonicalizationFlags(RegExpTerm root) {
|
||||
root.isRootTerm() and
|
||||
(
|
||||
RegExpFlags::isIgnoreCase(root) and
|
||||
result = "i"
|
||||
or
|
||||
not RegExpFlags::isIgnoreCase(root) and
|
||||
result = ""
|
||||
if RegExpFlags::isIgnoreCase(root) then
|
||||
result = "i"
|
||||
else
|
||||
result = ""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user