Skip to content

Commit

Permalink
coccinelle: use exists to improve efficiency
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
JuliaLawall authored and masahir0y committed Nov 14, 2017
1 parent bace648 commit 6851ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/coccinelle/iterators/list_entry_update.cocci
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ virtual context
virtual org
virtual report

@r@
@r exists@
iterator name list_for_each_entry;
expression x,E;
position p1,p2;
Expand Down

0 comments on commit 6851ba1

Please sign in to comment.