mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	Everywhere: Remove needless copies of Error / ErrorOr instances
Either take the underlying objects with release_* methods or move() the instances around.
This commit is contained in:
		
							parent
							
								
									52687814ea
								
							
						
					
					
						commit
						4a916cd379
					
				
					 28 changed files with 69 additions and 77 deletions
				
			
		|  | @ -403,7 +403,7 @@ ErrorOr<size_t> IPv4Socket::recvfrom(OpenFileDescription& description, UserOrKer | |||
|             nreceived = receive_packet_buffered(description, offset_buffer, offset_buffer_length, flags, user_addr, user_addr_length, packet_timestamp, blocking); | ||||
| 
 | ||||
|         if (nreceived.is_error()) | ||||
|             total_nreceived = nreceived; | ||||
|             total_nreceived = move(nreceived); | ||||
|         else | ||||
|             total_nreceived.value() += nreceived.value(); | ||||
|     } while ((flags & MSG_WAITALL) && !total_nreceived.is_error() && total_nreceived.value() < buffer_length); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Flynn
						Timothy Flynn