summaryrefslogtreecommitdiff
path: root/src/weston-launch.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2015-06-19 15:47:40 -0700
committerBryce Harrington <bryce@osg.samsung.com>2015-07-10 00:08:58 -0700
commit430aee1c23a641cf3227bcde08419458ef2ea252 (patch)
treed1701d7df90d81647f640eab3a74f26eee272ad9 /src/weston-launch.c
parent954f183e2f9891b241c1efc0ea61ed56019a4326 (diff)
downloadweston-430aee1c23a641cf3227bcde08419458ef2ea252.tar.gz
weston-launch: Drop redundant exit()
error(1, ...) already will exit, per man page: "If status has a nonzero value, then error() calls exit(3) to terminate the program using the given value as the exit status." So exit(EXIT_FAILURE) is never reached. The EXIT_FAILURE macro is guaranteed to be non-zero. Typically it's just 1, but on some systems (e.g. OpenVMS apparently) exit(1) means success so EXIT_FAILURE there is defined to some other non-zero value. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Diffstat (limited to 'src/weston-launch.c')
-rw-r--r--src/weston-launch.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/weston-launch.c b/src/weston-launch.c
index f67aaaf0..90a070fb 100644
--- a/src/weston-launch.c
+++ b/src/weston-launch.c
@@ -738,10 +738,8 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
wl.child = fork();
- if (wl.child == -1) {
- error(1, errno, "fork failed");
- exit(EXIT_FAILURE);
- }
+ if (wl.child == -1)
+ error(EXIT_FAILURE, errno, "fork failed");
if (wl.child == 0)
launch_compositor(&wl, argc - optind, argv + optind);