coccinelle: use exists to improve efficiency
PATCH 1/1 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 <[email protected]>
---
scripts/coccinelle/iterators/list_entry_update.cocci +1 -1
@@ -15,7 +15,7 @@ virtual context virtual org virtual report - at r@ + at r exists@ iterator name list_for_each_entry; expression x,E; position p1,p2;
2017-11-13 0:02 GMT+09:00 Julia Lawall <[email protected]>:
Quoted 12 lines
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 <[email protected]>---
scripts/coccinelle/iterators/list_entry_update.cocci +0
-0
scripts/coccinelle/iterators/list_entry_update.cocci virtual context · line 21
Quoted 8 lines
scripts/coccinelle/iterators/list_entry_update.cocci +1
-1@@ -15,7 +15,7 @@ virtual context virtual org virtual report - at r@ + at r exists@ iterator name list_for_each_entry; expression x,E; position p1,p2;
Applied to linux-kbuild/misc. Thanks!
Signature · 2 lines
Best Regards Masahiro Yamada