Skip to content

Commit f7c4fa6

Browse files
jketemageoffw0
andauthored
Apply suggestions from code review
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
1 parent 8f9d419 commit f7c4fa6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/lib/semmle/code/cpp/controlflow/Nullness.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ predicate nullCheckExpr(Expr checkExpr, Variable var) {
4646
or
4747
exists(LogicalAndExpr op, AnalysedExpr child |
4848
expr = op and
49-
(op.getLeftOperand() = child or op.getRightOperand() = child) and
49+
op.getAnOperand() = child and
5050
nullCheckExpr(child, v)
5151
)
5252
or
@@ -99,7 +99,7 @@ predicate validCheckExpr(Expr checkExpr, Variable var) {
9999
or
100100
exists(LogicalAndExpr op, AnalysedExpr child |
101101
expr = op and
102-
(op.getLeftOperand() = child or op.getRightOperand() = child) and
102+
op.getAnOperand() = child and
103103
validCheckExpr(child, v)
104104
)
105105
or

0 commit comments

Comments
 (0)