summaryrefslogtreecommitdiffstats
path: root/tools/coccinelle/bool_assignment.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'tools/coccinelle/bool_assignment.cocci')
-rw-r--r--tools/coccinelle/bool_assignment.cocci13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/coccinelle/bool_assignment.cocci b/tools/coccinelle/bool_assignment.cocci
new file mode 100644
index 0000000..e6146ea
--- /dev/null
+++ b/tools/coccinelle/bool_assignment.cocci
@@ -0,0 +1,13 @@
+@@
+bool b;
+@@
+
+(
+ b =
+- 0
++ false
+|
+ b =
+- 1
++ true
+)