Skip to content

Commit e487832

Browse files
committed
C++: Clean up QL.
1 parent 6b0360a commit e487832

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cpp/ql/lib/semmle/code/cpp/commons/NullTermination.qll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ predicate mayAddNullTerminator(Expr e, VariableAccess va) {
2121
)
2222
or
2323
// Assignment to another stack variable
24-
exists(Expr e0 |
25-
exists(StackVariable v0, Expr val |
26-
exprDefinition(v0, e, val) and // e resembles `v0 := val`
27-
val.getAChild*() = va and
28-
mayAddNullTerminator(e0, v0.getAnAccess())
29-
)
24+
exists(StackVariable v0, Expr val |
25+
exprDefinition(v0, e, val) and // e resembles `v0 := val`
26+
val.getAChild*() = va and
27+
mayAddNullTerminator(_, v0.getAnAccess())
3028
)
3129
or
3230
// Assignment to non-stack variable

0 commit comments

Comments
 (0)