From a5f6e69b14ff9a677c5ba5064cc47c5cf1aa7f3e Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 4 Mar 2020 18:47:09 +0200 Subject: [PATCH] tools: Coccinelle script to convert 0/1 to false/true if variable type is bool Signed-off-by: Donatas Abraitis --- scripts/coccinelle/bool_assignment.cocci | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 scripts/coccinelle/bool_assignment.cocci diff --git a/scripts/coccinelle/bool_assignment.cocci b/scripts/coccinelle/bool_assignment.cocci new file mode 100644 index 0000000000..e6146ea310 --- /dev/null +++ b/scripts/coccinelle/bool_assignment.cocci @@ -0,0 +1,13 @@ +@@ +bool b; +@@ + +( + b = +- 0 ++ false +| + b = +- 1 ++ true +) -- 2.39.5