mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
Kernel: Use KResultOr and TRY() for FIFO
This commit is contained in:
parent
631b8e90cd
commit
ed5d04b0ea
6 changed files with 10 additions and 18 deletions
|
@ -20,9 +20,7 @@ KResultOr<FlatPtr> Process::sys$pipe(int pipefd[2], int flags)
|
|||
return EINVAL;
|
||||
|
||||
u32 fd_flags = (flags & O_CLOEXEC) ? FD_CLOEXEC : 0;
|
||||
auto fifo = FIFO::try_create(uid());
|
||||
if (!fifo)
|
||||
return ENOMEM;
|
||||
auto fifo = TRY(FIFO::try_create(uid()));
|
||||
|
||||
auto reader_fd_allocation = TRY(m_fds.allocate());
|
||||
auto writer_fd_allocation = TRY(m_fds.allocate());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue