Signed-off-by: Laurent Vivier <lviv...@redhat.com>
---
 scripts/coccinelle/exit.cocci | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 scripts/coccinelle/exit.cocci

diff --git a/scripts/coccinelle/exit.cocci b/scripts/coccinelle/exit.cocci
new file mode 100644
index 0000000..73386c0
--- /dev/null
+++ b/scripts/coccinelle/exit.cocci
@@ -0,0 +1,12 @@
+// replace exit(0) by exit(EXIT_SUCCESS)
+//         exit(1) by exit(EXIT_FAILURE)
+
+@@
+@@
+(
+- exit(0)
++ exit(EXIT_SUCCESS)
+|
+- exit(1)
++ exit(EXIT_FAILURE)
+)
-- 
2.5.5


Reply via email to