Skip to content

Commit 95ea035

Browse files
authored
Merge pull request #809 from MathiasVP/fix-do-not-rely-on-indeterminate-values-of-errno-after-18207
C++: Change an `extends` to an `instanceof`
2 parents 2778d66 + d77250a commit 95ea035

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

c/cert/src/rules/ERR32-C/DoNotRelyOnIndeterminateValuesOfErrno.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ import semmle.code.cpp.controlflow.Guards
2020
* A check on `signal` call return value
2121
* `if (signal(SIGINT, handler) == SIG_ERR)`
2222
*/
23-
class SignalCheckOperation extends EqualityOperation, GuardCondition {
23+
class SignalCheckOperation extends EqualityOperation instanceof GuardCondition {
2424
BasicBlock errorSuccessor;
2525

2626
SignalCheckOperation() {
2727
this.getAnOperand() = any(MacroInvocation m | m.getMacroName() = "SIG_ERR").getExpr() and
2828
(
2929
this.getOperator() = "==" and
30-
this.controls(errorSuccessor, true)
30+
super.controls(errorSuccessor, true)
3131
or
3232
this.getOperator() = "!=" and
33-
this.controls(errorSuccessor, false)
33+
super.controls(errorSuccessor, false)
3434
)
3535
}
3636

0 commit comments

Comments
 (0)