tools: Add coccinelle script to convert int to bool if returning value is bool

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
Donatas Abraitis 2020-03-04 15:29:22 +02:00
parent f06c4576b7
commit d8b01b013b

View File

@ -0,0 +1,19 @@
@@
identifier fn;
typedef bool;
symbol false;
symbol true;
@@
- int
+ bool
fn (...)
{
?...
return
(
true
|
false
);
}