summaryrefslogtreecommitdiffstats
path: root/coccinelle/exit-0.cocci
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-22 13:24:40 +0100
committerLennart Poettering <lennart@poettering.net>2017-12-25 11:48:21 +0100
commita45d7127e716399ea0ff27b32d5247ee877d1ab4 (patch)
treef396ece5e662b1b8a80aa8f76bc08b7057341d98 /coccinelle/exit-0.cocci
parentshutdown: unify shutdown.c's and async.c's sync() helper process (diff)
downloadsystemd-a45d7127e716399ea0ff27b32d5247ee877d1ab4.tar.xz
systemd-a45d7127e716399ea0ff27b32d5247ee877d1ab4.zip
tree-wide: use EXIT_SUCCESS/EXIT_FAILURE in exit() where we can
Diffstat (limited to 'coccinelle/exit-0.cocci')
-rw-r--r--coccinelle/exit-0.cocci16
1 files changed, 16 insertions, 0 deletions
diff --git a/coccinelle/exit-0.cocci b/coccinelle/exit-0.cocci
new file mode 100644
index 0000000000..8b81600579
--- /dev/null
+++ b/coccinelle/exit-0.cocci
@@ -0,0 +1,16 @@
+@@
+@@
+- exit(0);
++ exit(EXIT_SUCCESS);
+@@
+@@
+- _exit(0);
++ _exit(EXIT_SUCCESS);
+@@
+@@
+- exit(1);
++ exit(EXIT_FAILURE);
+@@
+@@
+- _exit(1);
++ _exit(EXIT_FAILURE);