Skip to content

Commit 79d9fbe

Browse files
author
Daniel Kroening
authored
Merge pull request #129 from tautschnig/taint-analyzer
Avoid string contents comparison, perform cheap operation first in ||
2 parents 8316424 + 85b8d7b commit 79d9fbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/goto-analyzer/taint_analysis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ void taint_analysist::instrument(
134134
{
135135
bool match=false;
136136
for(const auto & i : identifiers)
137-
if(has_prefix(id2string(i), "java::"+id2string(rule.function_identifier)+":") ||
138-
id2string(i)==id2string(rule.function_identifier))
137+
if(i==rule.function_identifier ||
138+
has_prefix(id2string(i), "java::"+id2string(rule.function_identifier)+":"))
139139
{
140140
match=true;
141141
break;

0 commit comments

Comments
 (0)