diff options
| author | Julia Lawall <Julia.Lawall@lip6.fr> | 2017-11-12 10:02:18 -0500 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-14 09:21:16 -0500 |
| commit | 6851ba1a1b22ba2e0800002d531bf04ced22ec18 (patch) | |
| tree | 4c58659a3f592e706b2ba631c5d7ecb39e577799 /scripts | |
| parent | bace64800bae72c563bab66f23c7221fddaae142 (diff) | |
coccinelle: use exists to improve efficiency
This just needs to find any reassignment of the loop iterator, and doesn't
need such a thing on all execution paths, so use exists on the first rule.
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/coccinelle/iterators/list_entry_update.cocci | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/coccinelle/iterators/list_entry_update.cocci b/scripts/coccinelle/iterators/list_entry_update.cocci index 873f444e7137..be6f9f1abb34 100644 --- a/scripts/coccinelle/iterators/list_entry_update.cocci +++ b/scripts/coccinelle/iterators/list_entry_update.cocci | |||
| @@ -15,7 +15,7 @@ virtual context | |||
| 15 | virtual org | 15 | virtual org |
| 16 | virtual report | 16 | virtual report |
| 17 | 17 | ||
| 18 | @r@ | 18 | @r exists@ |
| 19 | iterator name list_for_each_entry; | 19 | iterator name list_for_each_entry; |
| 20 | expression x,E; | 20 | expression x,E; |
| 21 | position p1,p2; | 21 | position p1,p2; |
