> +- tmp = a;
> +- a = b;
> +- b = tmp;
> ++ swap(a, b);
How do you think about to use the following SmPL code variant?
* Omission of a few leading space characters
* Keeping a semicolon unmodified in a line
+-tmp = a;
+-a = b;
+-b = tmp
++swap(a, b)
+;
Regards,
Markus
Check for opencoded swap() implementation.
Signed-off-by: Denis Efremov
---
scripts/coccinelle/misc/swap.cocci | 77 ++
1 file changed, 77 insertions(+)
create mode 100644 scripts/coccinelle/misc/swap.cocci
diff --git a/scripts/coccinelle/misc/swap.cocci