Commit | Line | Data |
---|---|---|
34e49164 C |
1 | // this illustrates how when strict is not so effective. if the comment is |
2 | // removed, only the first return gets its spin_unlock, because the pattern | |
3 | // is not found under the then of the first if in the C code. it is not | |
4 | // good enough that there is a matching pattern around the then | |
5 | ||
6 | @@ | |
7 | expression l; | |
8 | @@ | |
9 | ||
10 | spin_lock(l); | |
11 | ... when any | |
12 | // when strict | |
13 | if (...) { | |
14 | + spin_unlock(l); | |
15 | return ...; | |
16 | } |