mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
SystemServer: Remove always-true "if (pid == 0)" check
This code should probably be structured differently to handle things like children dying, etc. But not right now. Found by PVS-Studio.
This commit is contained in:
parent
673a98258b
commit
1c50dce7d2
Notes:
sideshowbarker
2024-07-19 12:57:32 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1c50dce7d23
1 changed files with 14 additions and 18 deletions
|
@ -1,11 +1,11 @@
|
|||
#include <AK/Assertions.h>
|
||||
#include <LibCore/CFile.h>
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <LibCore/CFile.h>
|
||||
|
||||
void start_process(const char* prog, int prio)
|
||||
{
|
||||
|
@ -26,7 +26,6 @@ void start_process(const char* prog, int prio)
|
|||
}
|
||||
|
||||
while (true) {
|
||||
if (pid == 0) {
|
||||
dbgprintf("Executing for %s... at prio %d\n", prog, prio);
|
||||
struct sched_param p;
|
||||
p.sched_priority = prio;
|
||||
|
@ -42,9 +41,6 @@ void start_process(const char* prog, int prio)
|
|||
continue;
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue