mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Tests/Kernel: Remove redundant if
(#4111)
Problem: - If `fork()` fails the system tries to call `execl()`. That will either succeed and replace the running process image or it will fail and it needs to try again. The `if` is redundant because it will only be evaluated if `execl()` fails. Solution: - Remove the `if`.
This commit is contained in:
parent
b9bbf377d6
commit
a34939bcd5
Notes:
sideshowbarker
2024-07-19 01:12:33 +09:00
Author: https://github.com/ldm5180 Commit: https://github.com/SerenityOS/serenity/commit/a34939bcd54 Pull-request: https://github.com/SerenityOS/serenity/pull/4111 Reviewed-by: https://github.com/alimpfard
1 changed files with 1 additions and 2 deletions
|
@ -151,8 +151,7 @@ int main()
|
|||
if (!fork()) {
|
||||
try_again:
|
||||
printf("exec\n");
|
||||
if (execl(path, "x", nullptr) < 0) {
|
||||
}
|
||||
execl(path, "x", nullptr);
|
||||
goto try_again;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue