Przeglądaj źródła

Coccinelle: destroy_task_on_error.cocci: make sure we do not add a call to starpu_task_destroy() after a return statement.

Cyril Roelandt 13 lat temu
rodzic
commit
592aefa0d3

+ 8 - 0
tools/dev/experimental/destroy_task_on_error.cocci

@@ -95,10 +95,18 @@ f(...)
 {
 <+...
 if@p (...)
+(
 {
 ...
 + starpu_task_destroy(t);
+return ...;
 }
+|
+{
+...
++ starpu_task_destroy(t);
+}
+)
 ...+>
 }