1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 13:07:47 +00:00

LibDesktop: Collapse if-else in AppFile

This commit is contained in:
Jelle Raaijmakers 2021-08-04 13:15:57 +02:00 committed by Linus Groh
parent c7e72a52a3
commit 0ec39aafb6

View file

@ -124,12 +124,10 @@ bool AppFile::spawn() const
if ((errno = posix_spawn(&child_pid, executable().characters(), nullptr, nullptr, const_cast<char**>(argv), environ))) { if ((errno = posix_spawn(&child_pid, executable().characters(), nullptr, nullptr, const_cast<char**>(argv), environ))) {
perror("posix_spawn"); perror("posix_spawn");
return false; return false;
} else { } else if (disown(child_pid) < 0) {
if (disown(child_pid) < 0) {
perror("disown"); perror("disown");
return false; return false;
} }
}
return true; return true;
} }