mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:12:45 +00:00 
			
		
		
		
	Kernel/TTY: Don't return NonnullLockRefPtr when creating MasterPTY
We can just return a normal NonnullRefPtr because nobody needs an actual *LockRefPtrs here anymore.
This commit is contained in:
		
							parent
							
								
									82428e2a05
								
							
						
					
					
						commit
						b49f2937f0
					
				
					 2 changed files with 4 additions and 4 deletions
				
			
		|  | @ -16,12 +16,12 @@ | |||
| 
 | ||||
| namespace Kernel { | ||||
| 
 | ||||
| ErrorOr<NonnullLockRefPtr<MasterPTY>> MasterPTY::try_create(unsigned int index) | ||||
| ErrorOr<NonnullRefPtr<MasterPTY>> MasterPTY::try_create(unsigned int index) | ||||
| { | ||||
|     auto buffer = TRY(DoubleBuffer::try_create("MasterPTY: Buffer"sv)); | ||||
|     auto master_pty = TRY(adopt_nonnull_lock_ref_or_enomem(new (nothrow) MasterPTY(index, move(buffer)))); | ||||
|     auto master_pty = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) MasterPTY(index, move(buffer)))); | ||||
|     auto credentials = Process::current().credentials(); | ||||
|     auto slave_pty = TRY(adopt_nonnull_lock_ref_or_enomem(new (nothrow) SlavePTY(*master_pty, credentials->uid(), credentials->gid(), index))); | ||||
|     auto slave_pty = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) SlavePTY(*master_pty, credentials->uid(), credentials->gid(), index))); | ||||
|     master_pty->m_slave.with([&slave_pty](auto& slave) { | ||||
|         slave = *slave_pty; | ||||
|     }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Liav A
						Liav A