summaryrefslogtreecommitdiffstats
path: root/coccinelle/bool-cast.cocci
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--coccinelle/bool-cast.cocci12
1 files changed, 12 insertions, 0 deletions
diff --git a/coccinelle/bool-cast.cocci b/coccinelle/bool-cast.cocci
new file mode 100644
index 0000000..051ccb9
--- /dev/null
+++ b/coccinelle/bool-cast.cocci
@@ -0,0 +1,12 @@
+@@
+bool b;
+expression y;
+@@
+- b = !!(y);
++ b = y;
+@@
+bool b;
+expression y;
+@@
+- b = !!y;
++ b = y;