瀏覽代碼

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>
Julia Lawall 7 年之前
父節點
當前提交
6851ba1a1b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/coccinelle/iterators/list_entry_update.cocci

+ 1 - 1
scripts/coccinelle/iterators/list_entry_update.cocci

@@ -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;