mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 04:08:13 +02:00
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>
This commit is contained in:
parent
954f183e2f
commit
430aee1c23
1 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue