mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	UserspaceEmulator: Remove some unneeded String copies
This commit is contained in:
		
							parent
							
								
									57f0f8c9b7
								
							
						
					
					
						commit
						4d756c7d2d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -1114,11 +1114,11 @@ int Emulator::virt$realpath(FlatPtr params_addr) | |||
|     Syscall::SC_realpath_params params; | ||||
|     mmu().copy_from_vm(¶ms, params_addr, sizeof(params)); | ||||
| 
 | ||||
|     auto path = String::copy(mmu().copy_buffer_from_vm((FlatPtr)params.path.characters, params.path.length)); | ||||
|     auto path = mmu().copy_buffer_from_vm((FlatPtr)params.path.characters, params.path.length); | ||||
|     char host_buffer[PATH_MAX] = {}; | ||||
| 
 | ||||
|     Syscall::SC_realpath_params host_params; | ||||
|     host_params.path = { path.characters(), path.length() }; | ||||
|     host_params.path = { (const char*)path.data(), path.size() }; | ||||
|     host_params.buffer = { host_buffer, sizeof(host_buffer) }; | ||||
|     int rc = syscall(SC_realpath, &host_params); | ||||
|     if (rc < 0) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AnotherTest
						AnotherTest