Skip to content

Commit b0003c0

Browse files
committed
Ruby: Remove two redundant checks
1 parent d15e1b5 commit b0003c0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,7 @@ private module ParameterNodes {
11911191
/** Holds if a read-step should be added into parameter `p`. */
11921192
predicate readInto(ParameterNode p, ContentSet c) {
11931193
exists(int n |
1194-
isParameterNode(p, callable, any(ParameterPosition pos | pos.isPositional(n))) and
1195-
not exists(int i | splatParameterAt(callable.asCfgScope(), i) and i < n)
1194+
isParameterNode(p, callable, any(ParameterPosition pos | pos.isPositional(n)))
11961195
|
11971196
c = getArrayContent(n)
11981197
or
@@ -1465,7 +1464,6 @@ module ArgumentNodes {
14651464
exists(int n, ArgumentPosition pos |
14661465
arg.isArgumentOf(call, pos) and
14671466
pos.isPositional(n) and
1468-
not exists(int i | splatArgumentAt(call, i) and i < n) and
14691467
c = getArrayContent(n)
14701468
)
14711469
}

0 commit comments

Comments
 (0)