1
0
Fork 0
frr/tools/coccinelle/int_to_bool_function.cocci
Daniel Baumann 3124f89aed
Adding upstream version 10.1.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-05 10:03:58 +01:00

24 lines
244 B
Text

@@
identifier fn;
typedef bool;
symbol false;
symbol true;
identifier I;
struct thread *thread;
@@
- int
+ bool
fn (...)
{
... when strict
when != I = THREAD_ARG(thread);
(
- return 0;
+ return false;
|
- return 1;
+ return true;
)
?...
}