Skip to content

Commit 8c29d0e

Browse files
committed
C#: Address review comments.
1 parent 5a4af0c commit 8c29d0e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

csharp/ql/src/Concurrency/LockOrder.ql

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@
1414
import csharp
1515

1616
/**
17-
* Find a call target conservatively only when there is
18-
* a static target or one runtime target.
17+
* Gets a call target conservatively only when there is
18+
* one runtime target.
1919
*/
2020
Callable getCallTarget(Call c) {
21-
if count(c.getARuntimeTarget()) = 1 then
22-
result = c.getARuntimeTarget()
23-
else
24-
result = c.getTarget()
21+
count(c.getARuntimeTarget()) = 1 and
22+
result = c.getARuntimeTarget()
2523
}
2624

27-
/** Find any lock statement reachable from a callable. */
25+
/** Gets a lock statement reachable from a callable. */
2826
LockStmt getAReachableLockStmt(Callable callable) {
2927
result.getEnclosingCallable() = callable
3028
or
@@ -34,7 +32,7 @@ LockStmt getAReachableLockStmt(Callable callable) {
3432
}
3533

3634
/**
37-
* Finds nested pairs of lock statements, either
35+
* Holds if there is nested pairs of lock statements, either
3836
* inter-procedurally or intra-procedurally.
3937
*/
4038
predicate nestedLocks(Variable outerVariable, Variable innerVariable, LockStmt outer, LockStmt inner) {

0 commit comments

Comments
 (0)