summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-09 14:33:32 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 14:59:53 +0200
commit57255510c95ca3369d241502f26d7bbd8fac30a6 (patch)
tree0f08bcb8422da1cd42e6de2cf8d61f6db711956a /coccinelle
parent1f6b411372076426c0faf0bb350437fb4d82931f (diff)
tree-wide: replace while(1) by for(;;) everywhere
Another Coccinelle script.
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/while-true.cocci12
1 files changed, 12 insertions, 0 deletions
diff --git a/coccinelle/while-true.cocci b/coccinelle/while-true.cocci
new file mode 100644
index 0000000000..c23fb11f22
--- /dev/null
+++ b/coccinelle/while-true.cocci
@@ -0,0 +1,12 @@
+@@
+statement s;
+@@
+- while (true)
++ for (;;)
+s
+@@
+statement s;
+@@
+- while (1)
++ for (;;)
+s