diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-04 18:47:09 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-03-04 18:47:09 +0200 |
| commit | a5f6e69b14ff9a677c5ba5064cc47c5cf1aa7f3e (patch) | |
| tree | f7f088607abe42189c146cf19c7b5de492d5f3d4 | |
| parent | 286bbbecb06e87d9f695bffbb0f92d6196465f26 (diff) | |
tools: Coccinelle script to convert 0/1 to false/true if variable type is bool
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
| -rw-r--r-- | scripts/coccinelle/bool_assignment.cocci | 13 |
1 files changed, 13 insertions, 0 deletions
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 +) |
