Skip to content

Commit ede86dc

Browse files
committed
refactor
1 parent a6cb0a8 commit ede86dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cpp/cert/src/rules/CON54-CPP/WrapFunctionsThatCanSpuriouslyWakeUpInLoop.ql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
import cpp
1616
import codingstandards.cpp.cert
17-
import codingstandards.cpp.Concurrency
17+
import codingstandards.cpp.rules.wrapspuriousfunctioninloop.WrapSpuriousFunctionInLoop
1818

19-
from ConditionalWait cw
20-
where
21-
not isExcluded(cw, ConcurrencyPackage::wrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery()) and
22-
not cw.getEnclosingStmt().getParentStmt*() instanceof Loop
23-
select cw, "Use of a function that may wake up spuriously without a controlling loop."
19+
class WrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery extends WrapSpuriousFunctionInLoopSharedQuery {
20+
WrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery() {
21+
this = ConcurrencyPackage::wrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery()
22+
}
23+
}

0 commit comments

Comments
 (0)