Kernel: Remove unnecessary null check in Process::fork()

Found by PVS-Studio.
This commit is contained in:
Andreas Kling 2019-08-01 11:15:48 +02:00
parent e8b3a539b4
commit 1a13145cb3
Notes: sideshowbarker 2024-07-19 12:57:47 +09:00

View file

@ -238,8 +238,6 @@ int Process::sys$gethostname(char* buffer, ssize_t size)
Process* Process::fork(RegisterDump& regs)
{
auto* child = new Process(String(m_name), m_uid, m_gid, m_pid, m_ring, m_cwd, m_executable, m_tty, this);
if (!child)
return nullptr;
#ifdef FORK_DEBUG
dbgprintf("fork: child=%p\n", child);