Skip to content

Commit ef15980

Browse files
Remove unnecessary check for the name parameter as parameter 1
1 parent 2416040 commit ef15980

File tree

1 file changed

+3
-3
lines changed
  • csharp/ql/lib/semmle/code/csharp/frameworks

1 file changed

+3
-3
lines changed

csharp/ql/lib/semmle/code/csharp/frameworks/Razor.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ private class ViewCall extends MethodCall {
1111

1212
/** Gets the `name` argument to this call, if any. */
1313
string getNameArgument() {
14-
exists(StringLiteral lit, int i | i in [0 .. 1] |
15-
this.getTarget().getParameter(i).getType() instanceof StringType and
16-
DataFlow::localExprFlow(lit, this.getArgument(i)) and
14+
exists(StringLiteral lit |
15+
this.getTarget().getParameter(0).getType() instanceof StringType and
16+
DataFlow::localExprFlow(lit, this.getArgument(0)) and
1717
result = lit.getValue()
1818
)
1919
}

0 commit comments

Comments
 (0)