mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:38:12 +00:00
FileDescription: Disallow construction with a null File
It's not valid for a FileDescription to not have a file, so let's disallow it by taking a File& (or FIFO&) in the constructor.
This commit is contained in:
parent
0dc05a33c1
commit
752de9cd27
6 changed files with 18 additions and 19 deletions
|
@ -39,7 +39,7 @@ KResultOr<NonnullRefPtr<FileDescription>> PTYMultiplexer::open(int options)
|
|||
#ifdef PTMX_DEBUG
|
||||
dbgprintf("PTYMultiplexer::open: Vending master %u\n", master->index());
|
||||
#endif
|
||||
return FileDescription::create(master.ptr());
|
||||
return FileDescription::create(move(master));
|
||||
}
|
||||
|
||||
void PTYMultiplexer::notify_master_destroyed(Badge<MasterPTY>, unsigned index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue